Announcements
Hello,
I am working on a functionality where I am on an entity - Customer Leads. Now, in this entity we have a HTML web resource embedded on the form. On click of a button in that web resource, it needs to create a new record of the entity Customer appointment. The customer appointment entity has a few party list fields - regardingobjectid, from, to. I am trying to set the values for these party list fields and its not working for me. I researched some of the forums out there but everything is providing a solution only to create in the same entity. Not sure how to do it in a different entity. This is what am doing:
Hi Daniel,
How did you update the from and to?
Thanks,
Leyan
As I said earlier, issue was with filed name, correct?? looks like once I suggested on regardingobjectid you changed in your code, correct???
Signed, Sealed and Delivered.
Don't forget to help the community by Verifying the answer and Like it if your question has been answered. It will let others know that the topic has verified answer.
Thanks & Regards,
Ankit Shah(MCT-Microsoft Certified Trainer)
Follow/Connect 101 on below
LinkedIn:- https://linkedin.com/in/dynamicpower101/
Twitter:- https://twitter.com/Dynamicpower101
Facebook:- https://facebook.com/DynamicPower101/
Telegram:- https://t.me/dynamicpower101
Medium:- https://medium.com/dynamicpower101
Thanks for your input Ankit. That is correct. ` operator is a recent change and is recommended to use it instead of "". Anyways, I found the way to assign the value.
let parties = [];
parties.push({
"partyid_ed_customerlead@odata.bind": "ed_customerleads(" + customerLeadid+ ")",
participationtypemask: 2 // To
});
let data = {
ed_customerlead_activity_parties: parties,
"ownerid@odata.bind": `/systemusers(${currentUserId})`,
subject: value,
description: value,
}
Xrm.WebApi.createRecord("ed_customerappointment", data).then(
function success(result) {
console.log("Success: " + result.id);
// perform operations on record creation
},
function (error) {
console.log(error.message);
// handle error conditions
}
);
Hello once again I have checked your code in detail, can you double check your code??
Check below line.
Let me know which type of single quote in your code?
Signed, Sealed and Delivered.
Don't forget to help the community by Verifying the answer and Like it if your question has been answered. It will let others know that the topic has verified answer.
Thanks & Regards,
Ankit Shah(MCT-Microsoft Certified Trainer)
Follow/Connect 101 on below
LinkedIn:- https://linkedin.com/in/dynamicpower101/
Twitter:- https://twitter.com/Dynamicpower101
Facebook:- https://facebook.com/DynamicPower101/
Telegram:- https://t.me/dynamicpower101
Medium:- https://medium.com/dynamicpower101
Hi Ankit,
Thanks for responding. Yes, I do have a field called regardingobjectid. It is a party list field. Should I be assigning the values in a different manner?
Hello,
This error indicates that in your request you have a property/field that you are trying to set, doesn't exist in CRM or not matching with the name.
Are you sure you have a field ‘regardingobjectid’ on you customer appointment entity?
Signed, Sealed and Delivered.
Don't forget to help the community by Verifying the answer and Like it if your question has been answered. It will let others know that the topic has verified answer.
Thanks & Regards,
Ankit Shah(MCT-Microsoft Certified Trainer)
Follow/Connect 101 on below
LinkedIn:- https://linkedin.com/in/dynamicpower101/
Twitter:- https://twitter.com/Dynamicpower101
Facebook:- https://facebook.com/DynamicPower101/
Telegram:- https://t.me/dynamicpower101
Medium:- https://medium.com/dynamicpower101
André Arnaud de Cal...
294,261
Super User 2025 Season 1
Martin Dráb
232,996
Most Valuable Professional
nmaenpaa
101,158
Moderator