Current User ID issue
-
31. juli 2007 14:29
This all works fine through the webinterface but when talking about making this work through the workflow assembly (class library), I am unable to get the current user ID running the workflow assembly via the user interface, it sees it as a system user (not the current user that has logged into MS CRM).
This causes an issue when say I want to create an email message or a fax message as I get a SQL Integrity issue, but if I replace the GUID of the user to be say, me, then it works fine through the workflow assembly.
So I am concluding that the system user cannot perform the action to create an email message or fax. Either way, how am I able to get the current user logged into via the whoamirequest? (or perhaps another way?)
I'm looking at passing a parameter from the workflow.config into my method. However I always get an error saying that the Guid should contain 32 digits with 4 dashes
<parameter name="id" datatype="lookup" entityname="new_jobapplication"/>
<parameter name="SenderId" datatype="lookup" entityname="systemuser"/>This is being executed from a custom entity.
any ideas?
Alle besvarelser
-
31. juli 2007 16:07
OK, this was resolved by adding this line instead in the parameters:
<parameter name="Caller" datatype="caller"/>
this is a type string which contains XML data which contains the userid:
<caller><userid>{540C8042-A520-DC11-AE79-00132047A063}</userid><merchantid>{59344736-A520-DC11-AE79-00132047A063}</merchantid></caller>