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;

But its giving null exception error…

Thanks in advance…


Hi @akwar
here in an example


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

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…

Ankit Kwar

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