There are 2 entities named accounts and contacts.There is a ribbon button named "next best offer".when user will hit that button.A record in the existing contact Record named"Ankit Agarwal" should be populated in subgrid in account form.I have written the code,but it is not associated.
function func1
{
XrmServiceToolkit.Rest.Associate(
"A425F47D-F669-E511-810D-C4346BADA564",
"AccountSet",
"BDB011D4-D9A6-E511-8120-C4346BADA5BC",
"ContactSet",
"contact_customer_accounts",
function () {
alert("Associated"); //Success - No Return Data - Do Something
},
function (error) {
alert(error.message);
},
true
);
}