Tag Archives: Javascript
How to disable a form control in Dynamics CRM 2011 using Javascript
To disable a form control in Dynamics CRM 2011 using Javascript try below code: var control = Xrm.Page.ui.controls.get(“fieldname”);// like new_age control.setDisabled(true);
How to calculate current age from Date of Birth using Javascript in Dynamics CRM 2011
To calculate current age from date of birth using javascript in dynamics crm 2011 follow below: Checking month difference if it is 0 simply subtract the birth year from current year. If it is negative value simply subtract the birth … Continue reading
How to read XML file in Dynamics CRM 2011 using Javascript.
In Dynamics CRM 2011, we could maintain the XML files using web resource utility, which is a very good feature. It could be read using Javascript which is also maintained in the web resources of Dyanmics CRM 2011.You could make … Continue reading
How to retrieve the Selected Record Ids of a subgrid in Dynamics CRM 2011 using Javascript.
To retrieve the selected records of a subgrid in dynamics crm 2011 just write down below code in your javascript function. var accountContactsGrid= document.getElementById(“accountContactsGrid”).control; var selectedids = gridControl.get_selectedIds();
How to retrieve current User Id in Dynamics CRM 2011 using Javascript.
Only you need to write below code in your javascript function to get current user Id: var currentUserId = Xrm.Page.context.getUserId();