After migrating a previous CRM install to CRM 2016 there were a number of issues to be fixed. One of the issues involved a form with two dropdown boxes,
1. Selecting a value from the top dropdown box "Employers" would run a javascript function that returned a view with all the employees for that employer
2. The view would be used to populate the second ("Employees") dropdown box
There was an error that occurred anytime the Employer name contained an ampersand so I modified the javascript to encode the ampersand and everything worked fine after that, until I noticed that after creating the record, if you re-entered the same record you just created and then tried to click on the little magnifying glass icon associated with the "Employee" there would be a number of errors thrown - again, only if the "Employer" dropdown contained an employer name with an ampersand - but the it doesn't appear that the same javascript is being executed.
If I run fiddler when attempting to do this, I appear to get an error associated with the ampersand when making a call to LookupService.asmx. The error says "An error occurred while parsing EntityName..."
System.Xml.XmlException: An error occurred while parsing EntityName. Line 8, position 74.
at System.Xml.XmlTextReaderImpl.Throw(String res, Int32 lineNo, Int32 linePos)
at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
My question is - how do I find the code that is calling the LookupService? I do not see anything directly associated with clicking on the magnifying glass icon associated with the dropdown. Is there some way to view (or step through (F11)) the call to the LookupService?
Thanks.