I am new to Visual Studio Workflows, so please excuse my ignorance. I am having an issue setting the value of a People field. I have an Account Id coming from an InfoPath form. I need my workflow to take that value and insert/convert it to the value of the Person column.
Account Id
domain\username
Workflow Code
private void onWorkflowActivated(object sender, ExternalDataEventArgs e)
{
String acctId = (String)workflowProperties.Item["Account Id"];
acctId = "-1;#" + acctId;//I've been told this is the format the Person column is expecting
workflowProperties.Item["Stakeholders"] = acctId;
var s = workflowProperties.Item["Stakeholders"];//This is just a test
}
The current result is that the Stakeholders
field is null. I would like it to be a Person Object with the value provided by the Account Id
column. Any help would be much appreciated.
0 commentaires:
Enregistrer un commentaire