I am quite new to CRM and I have now built a Custom Activity. The Activity is global and not bound to an Entity.
The Activity is triggered by a Button placed on a form (entity) in CRM.
Now I need to retrieve the RecordId and the OwnerId of the Record in context.
On clientside this is easy and also with a plugin. But I was not able until now to figure out how to get these Guids in my Custom Activity.
EDIT: I've tried with this, but the Guid is always "000-00-000-000...."
IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
Guid recordId = context.PrimaryEntityId;
Maybe this is due to the fact that my CodeActivity is Global and I do not have a"PrimaryEntity"?
Any help is really appreciated!