Hello,
I am trying to create a workflow that generates an email that includes a table with results of a specific record.
We have a custom entity called "Business Diagnostic" which has a child entity of "Business Diagnostic Contents". When a flag is triggered on the "Business Diagnostic" entity, I want the workflow to pull data from both the "Business Diagnostic" and "Business Diagnostic Contents" for the Account that is related to the diagnostic. (There is an account field on both related entities).
I have created the workflow which uses 'Kaskela's Workflow Elements:Query - Get Results' which I have passed in some fetchXML to retrieve the data I want to put into a table.
When I hard code a person's GUID into the condition value - the workflow works. However, we want to pass in the GUID for the Account that is related to the specific "Business Diagnostic". After reading a lot of suggestions on the forum, we have tried a number of ways to get the GUID which haven't worked for us, such as:
"#name#" "+name+" '"+name+"' {"+name+"}
The fetchXML is as followed:
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"> <entity name="new_businessdiagcontent"> <attribute name="new_priority" /> <attribute name="new_discipline" /> <attribute name="new_businessdiagcontentid" /> <attribute name="new_primarysupportoffer" /> <order attribute="new_discipline" descending="false" /> <filter type="and"> <condition attribute="new_account" operator="eq" value="#accountid#" /> </filter> <link-entity name="new_supportoffer" from="new_supportofferid" to="new_primarysupportoffer" visible="false" link-type="outer" alias="a_299baed67641e811a96a000d3ab5cc4c"> <attribute name="new_whatdoesitdo" /> <attribute name="new_webaddress" /> <attribute name="new_telnumber" /> <attribute name="new_suppliername" /> <attribute name="new_phone" /> <attribute name="new_howaccessed" /> <attribute name="new_email" /> <attribute name="new_contactrole" /> <attribute name="new_contactname" /> <attribute name="new_benefittome" /> </link-entity> <link-entity name="new_businessdiagnostic" from="new_businessdiagnosticid" to="new_bdiagnostic2contentid" link-type="inner" alias="a_9a1fb6a10126e71180f95065f38b15b1"> <attribute name="new_businessdiagnostictitle" /> <attribute name="new_accounttodiagid" /> </link-entity> </entity> </fetch>
The main error we seem to be getting is a Plug In Error (xxxx-xxxxxx) looking for 32 GUID... so we know that the error lies within pointing to the right GUID dynamically.
Any suggestions would be much appreciated!
Thanks!!
*This post is locked for comments