ForumForumMainstream Foru...Mainstream Foru...WorkflowWorkflowWorkflow: Create A New Call RecordWorkflow: Create A New Call Record
Previous Previous
Next Next
New Post
 4/10/2011 12:28 AM


I would like to create a workflow that creates a Call when a Lead Status is changed to a certain value. Do you think you could provide an example on how to create a new record properly? The filtering part is easy. The alert is very easy. I have no trouble creating the new Call record, but I dont know how to update it with the necessary fields. For example, how to set the Parent ID field = Lead ID field or Parent Assigned User ID to Assigned User Id. I have played around with it for awhile and I am not getting anywhere.

If the first line is create a new record, should all the other lines be update a related record in order to populate with correct data?

When I Google Windows Workflow Foundation, I get a lot of overview material on why or why not to use it. Do you have something that you would suggest referencing for simple operations? Or maybe what I am trying to do is not that simple? Is there a Windows Workflow Foundation basics guide that your reccomend?

New Post
 4/10/2011 1:12 AM

Setting the PARENT_ID is easy. Just use the normal WWF activity binding {ActivityBind Leads1, Path=ID}. Here is an example:

Action Rel Name Module Field Type Operator Value
new Calls CALLS Calls CALLS CALLS.NAME string equals Call {ActivityBind Leads1, Path=FIRST_NAME} {ActivityBind Leads1, Path=LAST_NAME}
new Calls CALLS Calls CALLS CALLS.PARENT_TYPE string equals Leads
new Calls CALLS Calls CALLS CALLS.PARENT_ID guid equals {ActivityBind Leads1, Path=ID}

<crm:SplendidSequentialWorkflow x:Name="Workflow1" WORKFLOW_ID="2f703f63-8e8b-49f5-aa4b-33f4d346256d" xmlns:crm="clr-namespace:SplendidCRM;Assembly=SplendidCRM" xmlns:x="" xmlns="">
<crm:LeadActivity x:Name="Leads1" WORKFLOW_ID="{ActivityBind Workflow1,Path=WORKFLOW_ID}" AUDIT_ID="{ActivityBind Workflow1,Path=AUDIT_ID}" xmlns:x="">
<crm:WorkflowLogActivity x:Name="Leads1_Log" MODULE_TABLE="LEADS" WORKFLOW_ID="{ActivityBind Workflow1,Path=WORKFLOW_ID}" />

<CodeActivity x:Name="Leads1_LoadByAUDIT_ID" ExecuteCode="{ActivityBind Leads1,Path=LoadByAUDIT_ID}" />
<crm:CallActivity x:Name="Calls1" WORKFLOW_ID="{ActivityBind Workflow1,Path=WORKFLOW_ID}" PARENT_ID="{ActivityBind Leads1,Path=ID}" xmlns:x="">
<crm:SetValueActivity x:Name="Calls1_Name_append0" LVALUE="{ActivityBind Calls1,Path=NAME}" RVALUE="Call " OPERATOR="equals" />
<crm:SetValueActivity x:Name="Calls1_Name_append1" LVALUE="{ActivityBind Calls1,Path=NAME}" RVALUE="{ActivityBind Leads1, Path=FIRST_NAME}" OPERATOR="append" />
<crm:SetValueActivity x:Name="Calls1_Name_append2" LVALUE="{ActivityBind Calls1,Path=NAME}" RVALUE=" " OPERATOR="append" />
<crm:SetValueActivity x:Name="Calls1_Name_append3" LVALUE="{ActivityBind Calls1,Path=NAME}" RVALUE="{ActivityBind Leads1, Path=LAST_NAME}" OPERATOR="append" />
<crm:SetValueActivity x:Name="Calls1_ParentType" LVALUE="{ActivityBind Calls1,Path=PARENT_TYPE}" RVALUE="Leads" OPERATOR="equals" />
<crm:SetValueActivity x:Name="Calls1_ParentID" LVALUE="{ActivityBind Calls1,Path=PARENT_ID}" RVALUE="{ActivityBind Leads1, Path=ID}" OPERATOR="equals" />

<CodeActivity x:Name="Calls1_Save" ExecuteCode="{ActivityBind Calls1,Path=Save}" />

New Post
 6/22/2011 6:32 PM

I seem to be having a lot of difficulty with custom fields in Workflows. In the Workflow condtions I can see custom fields, but the filtering doesnt seem to work. In the Workflow actions, I cant seem to use any of the custom fields.

Can you suggest anything?

Do I need to upgrade to 5.5?

New Post
 6/22/2011 10:30 PM

An upgrade should not be necessary, but is certainly encouraged.

The issue is likely that the DLL does not support your custom field. You need to run ~/_code/GenerateActivities.aspx to update the activity file for each module, then you need to recompile the DLL. It is not until a successful recompile of the DLL will the custom fields become available. Just running GenerateActivities.aspx is not enough.

New Post
 6/24/2011 11:50 AM

Got it. Stupid question maybe but: When you say to recompile the DLL, is this an activity that can be done from the web browser ( IE Recompile, Precompile buttons) or you mean it needs to be recomplied from Visual Studio

Previous Previous
Next Next
ForumForumMainstream Foru...Mainstream Foru...WorkflowWorkflowWorkflow: Create A New Call RecordWorkflow: Create A New Call Record