Dynamics 365 Workflow Tools is a Community solution that expands Microsoft Dynamics 365 (CRM) Workflow features with lots of new posibilities. This helps you to build very advanced Codeless solutions in CRM.
I am using "Entity JSON Serializer" in a workflow to gather all attributes on the systemuser entity. I am then using JSON parser to extract specific fields from the JSON output. However, the domainname attribute is throwing the error below due to a bad escape. Since the domainname field typically stores the format of domain\username, it is failing due to the unescaped backslash. i.e. "\".
Error:
Bad JSON escape sequence: \A. Path 'systemuser.domainname', line 1, position 1650.
Trace:
Plugin Trace:
[msdyncrmWorkflowTools: msdyncrmWorkflowTools.JsonParser]
[msdyncrmWorkflowTools (1.0.51.1): JSON Parser]
Load CRM Service from context --- OK
ObjectTypeCode=8--ParentId=52b4de4e-e081-e711-bc75-00155d141142
retrieved object OK
attribute:address1_line1
attribute:internalemailaddress
attribute:address1_line3
attribute:skills
attribute:address1_addresstypecode
attribute:title
attribute:address1_shippingmethodcode
attribute:lastname
attribute:address1_city
attribute:calendarid
attribute:setupuser
attribute:islicensed
attribute:userlicensetype
attribute:preferredemailcode
attribute:queueid
attribute:firstname
attribute:displayinserviceviews
attribute:outgoingemaildeliverymethod
attribute:preferredphonecode
attribute:emailrouteraccessapproval
attribute:middlename
attribute:address1_country
attribute:preferredaddresscode
attribute:incomingemaildeliverymethod
attribute:transactioncurrencyid
attribute:address1_telephone1
attribute:address1_telephone3
attribute:siteid
attribute:accessmode
attribute:isintegrationuser
attribute:caltype
attribute:domainname
attribute:address1_line2
attribute:address2_addresstypecode
attribute:address1_postalcode
attribute:parentsystemuserid
attribute:invitestatuscode
attribute:issyncwithdirectory
attribute:businessunitid
attribute:address2_shippingmethodcode
json object OK
Load CRM Service from context --- OK
Error Message:
Unhandled Exception: Newtonsoft.Json.JsonReaderException: Bad JSON escape sequence: \A. Path 'systemuser.domainname', line 1, position 1650.
at Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote)
at Newtonsoft.Json.JsonTextReader.ParseString(Char quote, ReadType readType)
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json)
at msdyncrmWorkflowTools.msdyncrmWorkflowTools_Class.JsonParser(String Json, String JsonPath)
at msdyncrmWorkflowTools.JsonParser.Execute(CodeActivityContext executionContext)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
I am using "Entity JSON Serializer" in a workflow to gather all attributes on the systemuser entity. I am then using JSON parser to extract specific fields from the JSON output. However, the domainname attribute is throwing the error below due to a bad escape. Since the domainname field typically stores the format of domain\username, it is failing due to the unescaped backslash. i.e. "\".
Error: Bad JSON escape sequence: \A. Path 'systemuser.domainname', line 1, position 1650.
Trace: Plugin Trace:
[msdyncrmWorkflowTools: msdyncrmWorkflowTools.JsonParser] [msdyncrmWorkflowTools (1.0.51.1): JSON Parser] Load CRM Service from context --- OK ObjectTypeCode=8--ParentId=52b4de4e-e081-e711-bc75-00155d141142 retrieved object OK attribute:address1_line1 attribute:internalemailaddress attribute:address1_line3 attribute:skills attribute:address1_addresstypecode attribute:title attribute:address1_shippingmethodcode attribute:lastname attribute:address1_city attribute:calendarid attribute:setupuser attribute:islicensed attribute:userlicensetype attribute:preferredemailcode attribute:queueid attribute:firstname attribute:displayinserviceviews attribute:outgoingemaildeliverymethod attribute:preferredphonecode attribute:emailrouteraccessapproval attribute:middlename attribute:address1_country attribute:preferredaddresscode attribute:incomingemaildeliverymethod attribute:transactioncurrencyid attribute:address1_telephone1 attribute:address1_telephone3 attribute:siteid attribute:accessmode attribute:isintegrationuser attribute:caltype attribute:domainname attribute:address1_line2 attribute:address2_addresstypecode attribute:address1_postalcode attribute:parentsystemuserid attribute:invitestatuscode attribute:issyncwithdirectory attribute:businessunitid attribute:address2_shippingmethodcode json object OK Load CRM Service from context --- OK
Error Message: Unhandled Exception: Newtonsoft.Json.JsonReaderException: Bad JSON escape sequence: \A. Path 'systemuser.domainname', line 1, position 1650. at Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote) at Newtonsoft.Json.JsonTextReader.ParseString(Char quote, ReadType readType) at Newtonsoft.Json.JsonTextReader.ParseValue() at Newtonsoft.Json.JsonTextReader.Read() at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings) at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options) at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings) at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings) at Newtonsoft.Json.Linq.JObject.Parse(String json) at msdyncrmWorkflowTools.msdyncrmWorkflowTools_Class.JsonParser(String Json, String JsonPath) at msdyncrmWorkflowTools.JsonParser.Execute(CodeActivityContext executionContext) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Screenshot: (Value altered for privacy)
CRM On Premise: 8.2.1.342 Workflow Tools 1.0.51.1