Showing posts from February, 2014

JavaScript Bookmark to Enter Debug Mode of CRM Form (Show Logical Names of the Attributes) in CRM 2011/2013

Sonoma Partners posted 3 parts of JavaScript Bookmark Series and from all of them, the script from the Part 3 has been the most useful bookmark for my development. The bookmark basically run JavaScript which replace the label of the attributes with the logical name of those attributes. The script is really useful but the problem is I need to manually re-type the logical names which prone to error and sometimes when the logical name is too long to fit, the later part of the name are truncated with the input boxes and sometimes, the new label is not even showing on mouseover.

So, I updated the script to show the logical names with a new text box under each label (which also preserves the original label for the comparison). I also added some new features like showing logical name of the entity and record GUID as well as showing all hidden tabs and sections, enabling all disabled attributes. (which is kind of going into debug mode of the CRM form)  :D

In order to use the JavaScript Bookma…

Adding Additional Condition to Lookup View in CRM 2011 Based on the Current Default View (addCustomFilter for CRM 2011)

As we all know, we can add the custom filtered view in the lookup by using addCustomView in the JavaScript. We can also see a lot of sample scripts online to use that method. All of the scripts that I've gone through need to provide fetchXml and layoutXml.

I also used to code the same way and get the fetchXml by downloading from Advanced Find and layoutXml by using View Layout Replicator of XRM Toolbox. The problem with this method is that the columns are hardcoded in the script and the customization changes to the views are no longer applicable.

So, I just modified the script in order to add the custom filtered view based on the current default view of the lookup which also saves some development time for getting the layout XML. The parameters required for the script are

The name of the new viewCondition and link entity part of the Fetch XML (which you can easily obtained from Advanced Find)Lookup attribute logical name
Please take note that the following script contains one Soap.…