Hi,
I want to create a crm record from portal using javascript/Webapi.
Please help me with this.
Thanks in advance!!
Hi,
I want to create a crm record from portal using javascript/Webapi.
Please help me with this.
Thanks in advance!!
Hello,
pls refer this link,
https://www.youtube.com/watch?v=fN4kPyjB6OY
I hope it helps,
Thanks.
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365
If anyone needs further help from Leo's reply this link details step by step guidance in detail.
https://docs.microsoft.com/en-us/powerapps/maker/portals/web-api-perform-operations
Hi Partner,
If you want to use web api in portal, please make sure your portal version is 9.2.6.41 or higher.
Here is the sample code for creating new contact into D365.
function addSampleRecord() { //Sample data to create a record - change as appropriate var recordObj = { firstname: "Willie", lastname: "Huff" _.random(100, 999), emailaddress1: "Willie.Huff@contoso.com", telephone1: "555-123-4567" }; appAjax('Adding...', { type: "POST", url: "/_api/contacts", contentType: "application/json", data: JSON.stringify(recordObj), success: function (res, status, xhr) { recordObj.id = xhr.getResponseHeader("entityid"); recordObj.fullname = recordObj.firstname " " recordObj.lastname; table.addRecord(recordObj); } }); return false; }
Make sure that the user login the portal has the permission to Contact.
https://docs.microsoft.com/en-us/powerapps/maker/portals/web-api-perform-operations#example
Regards,
Leo
André Arnaud de Cal... 291,431 Super User 2024 Season 2
Martin Dráb 230,503 Most Valuable Professional
nmaenpaa 101,156