Invoke UiPath activities from C# code of Custom Activities

Hello All,

Can someone please share me a sample C# code for custom activity,
for invoking LogMessage [or any UiPath activity ] from custom activity code.

I have tried this :
LogMessage act = new LogMessage() {};
act.Message = “Hello Test”;
act.Level = UiPath.Core.Activities.LogLevel.Info;
WorkflowInvoker.Invoke(act);

But its giving null exception error…

Thanks in advance…

Regards
Ankit

Hi @akwar
here in an example

Regards

1 Like

Hello @fernando_zuluaga,

Thank you for the reply…

I am able to create custom activities with and without Activity creator,
I have a situation where I need to call get LogMessage and GetAsset from that activity execute method…
thats where I am not able to find a sample code or workaround

Regards
Ankit Kwar

Have you checked out the documentation? There’s example code on how to create a LogMessage there.

Hello @ptrobot ,

This worked, Thank You :slightly_smiling_face:
I still am not able to execute one of the UiPath.Core activity??
Any reference link would be great…

Regards
Ankit Kwar

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.