Showing posts from December, 2015

Modify the Columns Shown in The Inline Lookup-CRM 2013 & 2015

How to modify the columns shown in the inline lookup in CRM 2013 Refreshed Entity User Interface and what can be done and what cannot be done. In the example (lookup to Contact), it shows only Name, Company Name, and Email Address. You found that Email Address is not important, you want to show Name, City, and Company Name. Explanation : 1. Go to Form Editor 2. Go to the field and check the lookup that is used, in this case is Contact view (lookup view) and get the Default View of the Lookup field *You can also use custom view as default view. 3. Go to the Contact Lookup View and then you add can re-order the position Previously: Change to: *You cannot modify the Full Name position nor remove it. 4. Test the  Result : * The supported total column shown in the inline lookup is 3 only (including Name as the primary field that is not replaceable) It shows Name, City, and Company Name as per your expectation. 5. You can also use a Composite field, for example, Address Result : And you c

Activate – Deactivate Record using JavaScript in CRM

Activate – Deactivate Record using JavaScript in CRM //Params:entityname,entityGuid,stateCode,StatusCode // Call the funtion changeRecordStatus("contact",, 1, 2); function changeRecordStatus(EntityLogicalName, RECORD_ID, stateCode, statusCode) {     // create the SetState request     var request = "<s:Envelope xmlns:s=\"\">";     request += "<s:Body>";     request += "<Execute xmlns=\"\" xmlns:i=\"\">";     request += "<request i:type=\"b:SetStateRequest\" xmlns:a=\"\" xmlns:b=\"\">";     request += "<a:Parameters xmlns:c=\"

Using New Scripting Methods in CRM 2016

With the release of Dynamics CRM 2016, new client side methods introduced that we can use to make user experience more interactive while enter data in CRM forms. Following are the methods: • getValue • Keypress • Autocomplete getValue Method – This method is used to get the latest value of the field. Earlier this method was only available in attribute collection, which provides value of the field only after Onchange event fired. Whereas when it is used with control collection, we can capture value as soon as users starts entering value in field, so it means if we have any requirement to validate data entry then we can use this method to make it more interactive. We can use this method like below: Xrm.Page.getControl(field name).getValue(); Let’s take one example that we want to restrict user to enter only number between 0-9 under phone field in account entity, so we can simply use below code to do that: function OnTelephone1KeyPress