Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Bulk Update Using javascript

(0) ShareShare
ReportReport
Posted on by 2,622

Hello Experts,

I am trying to update bulk opportunity record, there are more then 100 records but code update only few and for rest it throw the error like below. And if i keep running the code multiple time all records will be updated. Please provide your opinion.

pastedimage1577973222759v1.png

here is the part of code to update the record.

I am using below 

data1.edb_assignto = {
Id: newsectorHeadGuid,
LogicalName: "systemuser",
Name: newsectorHead
};

SDK.REST.updateRecord(data.value[i]["opportunityid"], data1, "Opportunity", saved,err);

  • Suggested answer
    Pawar Pravin  Profile Picture
    Pawar Pravin 5,227 on at
    RE: Bulk Update Using javascript

    Hi Vikas,

    I would suggest you to use custom action in place of JS.

    Please refer below url to call action using js function.

    pravinpawarweb.wordpress.com/.../

  • Dharanidharan Profile Picture
    Dharanidharan 390 User Group Leader on at
    RE: Bulk Update Using javascript

    Yeah, I agree with Arun Vinoth. for the bulk update, it's better to go with server-side code like plugins, workflows or actions. Here is the Sample Code to bulk update the record using ExecuteMultiple in Dynamics 365

    community.dynamics.com/.../sample-code-to-bulk-update-the-record-using-executemultiple-in-dynamics-365

    Also, can you please check whether any plugin/workflow is running on that update of the opportunity record?

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Bulk Update Using javascript

    Not sure why you are using Client side library from JS for CRM bulk updates. You should be doing server side like plugin or Custom actions.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,253 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans