This is in continuation to my Previous Post.
Requirement: Now that we know the FS Workflow Utility is used to generate list of Field values in a comma separated format, my final goal is to set the Value in a Field and show in UI.
Solution: For this I chose to use a Calculated field to invoke the Business Service and get the value in output.
The format of the Calculated Value is given below.
InvokeServiceMethod ("Service Name", "Method Name", "Input1=Value1, Input2=Value2, etc", "Output")
This sets the output of the service call to the calculated field. Now I have a problem, the output as I said earlier is a property set not a String. We need to get the PropertySet's Property value in Output.
For this I have designed a workflow to call FS Workflow Utility Service and the from Output, get the Property value using PRM ANI Utility or Workflow Utilities Echo Method in the workflow and set the output property.
Below is the workflow diagram.
This is the expression I arrived at first for the calculated field.
InvokeServiceMethod ("Workflow Process Manager", "RunProcess", "ProcessName=Get List Workflow, BO=Account, BC=Account Position, Srch=[Id] = + '[Id]'+,Field=Position Id", "Value")
The above expression did not work as the single quotes, double quotes and equals signs are confusing the compiler.
The Problem is I need to pass the Search Spec with quotes. I created a calculated field for framing the search expression.
Field Name=Srch : Value = "[Account Id]='" + [Row Id] +"'"
Now I looked up ways to pass field values in the parameters.
eval() function: eval(String) function evaluates the string values as if it is a variable in Javascript.
For Example, if I want to get '[Id]= current record Parent Id' in search spec,
I would write '[Id]='+ eval([Parent Row Id]) +'
The final expression is
InvokeServiceMethod ("Workflow Process Manager", "RunProcess", "ProcessName=Get List Workflow, BO=Account, BC=Account Position, Srch=eval([Srch]),Field=Position Id", "Value")
Finally the expression worked and I am able to get the field value.
Hello Khadar,
ReplyDeleteThanks for the post, its very interesting post,
Would you mind the post the input and output arguments and business service and method of 'Get Property' step?
-Raju
Hi,
DeleteYou can use PRM ANI Utility GetProperty method or Workflow Utilities Echo method. For both, the input is your Output PropertySet from previous step. Please check these BS in Tools for input and output arguments.
-Khadar
Thanks, this is generally helpful.
ReplyDeleteStill, I followed step-by-step your method in this
salesforce training
salesforce online training India
salesforce online training
salesforce certification
salesforce course online