Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

Please help me out in the following issue

$
0
0

There are 2 entities named contact and offer(custom entity).There is a 1:N relationship from contact to offer entity.there is also a subgrid of offer in contact entity and a ribbon button named next best offer,the requirement is when the ribbon button is hitted a new offer record is created ,whose name is Freedom rewards.But iam not getting the record created after hitting the button.My code is given below:

function subgrid()
{
var contactId = Xrm.Page.data.entity.getId();
var createofferforCC = new XrmServiceToolkit.Soap.BusinessEntity("cgfs_offer");
createofferforCC.attributes["cgfs_name"] = "Freedom Rewards";
createofferforCC.attributes["cgfs_customer"] = { id: contactId, logicalName: "contact", type: "EntityReference" };
XrmServiceToolkit.Soap.Create(createofferforCC);

Xrm.Page.ui.controls.get("Offers").refresh();

}


Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>