This is just a quick post, partly for future reference for myself! When working with Unified Service Desk (USD), you often come across syntax like this;
[[contact.name]] [[contact.Id]+] [[account.websiteurl]u] [[contact.telephone1]x]
When I first saw this style of notation I didn’t really understand the meaning of “]]”, “]+]”, “]u]”, “]x]” etc. On one level it didn’t matter as long as the “code” I entered worked! But knowing when you might use “[[parentcustomer.Id]+]” instead of “[[parentcustomer.Id]]” can sometimes be important.
This link to Microsoft explains the replacement parameters. It took we quite awhile before I stumbled on this. So I thought posting it might help.
https://msdn.microsoft.com/en-us/library/dn864934.aspx
Some tips;
- If a value might return a null, use [[afield]+], as this will handle nulls correctly.
- If you are constructing a url, use the “]u]”, as this adds %20 for spaces etc.
- If the string might contain “special” characters such as “<“, the use “]x]” to ensure they display correctly.
- You can combine combinations, like “[[telephone1]+x]”, for a telephone number that might be null and might contain “special” characters.
Also the link below explains how to access various system replacement parameters. Such as $User, $Session, $Global etc. Trying looking in the debugger data parameters tab to see the contents of these.
https://msdn.microsoft.com/en-us/library/dn864992.aspx
Some examples.
- To return the start time of a session use [[$Session.StartTime]g]
- Use this [[$User.fullname]g] to return the name of the current user. (Useful in agent scripts etc.)
- This will return the number of open sessions [[$Session.Count]g], and this [[$Global.maxNumberOfSessions]] will return the maximum number of session possible.
Pingback: Learning USD | Microsoft Dynamics CRM and Unified Service Desk
Pingback: Learning USD - Microsoft Dynamics CRM Community
Neil, thank you for your helpful series of USD posts.
Regarding replacement parameters, though…whenever I save a new record, its “.Id” value (e.g. [[contact.Id]] doesn’t show up in its list of replacement parameters, even after refreshing the list in the debugger. Have you run into this?
LikeLike
Thanks for your comment and responding to my blog.
I have seen the issue you describe, once. But at the time I thought the issue was specific to the USD version I was using and only happened with CRM online.
What version of CRM and USD are you using?
LikeLike
Pingback: USD – The Book | Microsoft Dynamics CRM and Unified Service Desk
Pingback: USD – Translate and DetectLanguage Actions | Microsoft Dynamics CRM and Unified Service Desk
Pingback: USD – Translate and DetectLanguage Actions - Microsoft Dynamics CRM Community