Tag Archives: javascript
Using JavaScript to assign a record
A while back, a user on the Microsoft Dynamics forums asked how to assign a record using JavaScript. Here’s the code, remember to update the userid and recordid variables. var header = GenerateAuthenticationHeader(); var userid = "838975f4-029c-de11-9693-0003ffc4c746"; var recordid = … Continue reading
Filed under Uncategorized
Setting a lookup value to null
To set a lookup field to null you’d do the following in your c# code: vehicle.new_accountid = new Lookup(); vehicle.new_accountid.IsNull = true; vehicle.new_accountid.IsNullSpecified = true; To do the same using JavaScript, you’d do the following: crmForm.all.new_accountid.DataValue = null;
Filed under Uncategorized
Performing a Javascript Web Service call to the Metadata Service
About a week ago a colleague of mine told me that he’d been able to use my JS script to retrieve fields from a related record upon the change of a lookup value- which worked exactly as he wanted. However, … Continue reading
Filed under Uncategorized