Update Dynamic Property Instance using JavaScript in CRM 2015

Hi,
 
Today we got the requirement to update Dynamic Product Properties of an Opportunity Product using JavaScript.
 
Here is the JavaScript code for doing it.
 
function updateProductProperties() {
   var vUpdateProperty = {};
   vUpdateProperty.ValueString = “testing”;
   vUpdateProperty.DynamicPropertyId = { Id: “”, LogicalName: “dynamicproperty” };
   vUpdateProperty.RegardingObjectId = { Id: “”, LogicalName: “opportunityproduct” };
   var vdynamicProductPropertyId = “”;
   SDK.REST.updateRecord(vdynamicProductPropertyId, vUpdateProperty, “DynamicPropertyInstance”, function () { alert(“The dynamic property instance record changes were saved”); }, function (error) { alert(error.message); });
}

Refer this link for Updating Product Properties using C#

Hope this helps.
 

Happy CRM’ing
Gopinath

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s