Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Unexpected returning object format from Xrm.WebApi.online.executeMultiple after plugin throws an InvalidPluginExecutionException

(0) ShareShare
ReportReport
Posted on by 5

I tried to test my request that was made with executeMultiple.
They were normal requests, no change sets.
In my plugin I made a simple random number generator and told it to throw an InvalidPluginExecutionException if a number is smaller than 3.
In the official docs I believe it says that if one of the requests in a batch of request fails, in the response object it will show as "ok: false", and I should get back all the responses for the other requests as well. 
I only got back the single error message, and no other info.
In the networks tab, in the reponse I can see that some passed, and one fails, and after that nothing is executed, and it returns with "Bad Request 400" status.
I'd really need the data which ones pass and which ones don't (in my code, not for my eyes to see in the tab).
What should I do?

Normal reponse object:

normal-object.png

Custom error I get:

custom-error.png

Network tab:

custom-error-network.jpg

  • Suggested answer
    Bipin D365 Profile Picture
    28,981 Moderator on at
    RE: Unexpected returning object format from Xrm.WebApi.online.executeMultiple after plugin throws an InvalidPluginExecutionException

    Hi,

    Can you please share your code which you have used?

    Also as per Microsoft DOC you should get array of object in response with below attributes.

    successCallback Function No

    A function to call when operation is executed successfully. An array of response objects are passed to the function where each response object has the following attributes:

    body: (Optional). Object. Response body.

    headers: Object. Response headers.

    ok: Boolean. Indicates whether the request was successful.

    status: Number. Numeric value in the response status code. For example: 200

    statusText: String. Description of the response status code. For example: OK

    type: String. Response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text".

    url: String. Request URL of the action, function, or CRUD request that was sent to the Web API endpoint.

    If found helpful, Please mark my answer verified.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 82 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans