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 = "<DynamicPropertyInstanceGUID>";
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
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 = "<DynamicPropertyInstanceGUID>";
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
No comments:
Post a Comment