web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Getting error when fulfill the order in Mobile Client(Unified User Interface)

(0) ShareShare
ReportReport
Posted on by

Hi,

I am getting following error when I fulfill the order in Mobile Client(Unified User Interface). However, it is working fine Web.
1- We have created a plugin which verify few things before SalesOrder get fulfilled or canceled.
2- We have created a plugin which enter data to other entities after SalesOrder get fulfilled or canceled.

Error Message: "This message can not be used to set the state of SalesOrder to Fulfilled. In order to set state of SalesOrder to Fulfilled, use the FulfillSalesOrderRequest Request message instead."

Version: MS Dynamics 365, v9.0

Please suggest

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Chhaya,

    It doesn't seem right that the plugin is failing only for UI interface because plugin executes server side and it doe not matter from where the action is performed (i.e. web, UI, web resource, console app etc).

    With that said, it is possible that you may have some condition in you rplugin which only satisfy when you create the record from UI. Nevertheless, the error in question is expected if you simply set the state to close the salesorder instead you need to use a FulfillSalesOrderRequest .

    Here is the sample code-

    ===========

    using (service = new OrganizationServiceProxy(new Uri(_organizationURI), null, _credential, null))

               {

                   var entityId = new Guid("2F250019-4968-E711-811B-E0071B67AC81");

                   var entityName = "salesorder";

                   var targetEntity = service.Retrieve(entityName, entityId, new ColumnSet(true));

                   Entity erOrderClose = new Entity("orderclose");

                   erOrderClose["salesorderid"] = new EntityReference("salesorder", targetEntity.Id);

                   FulfillSalesOrderRequest req = new FulfillSalesOrderRequest();

                   req.OrderClose = erOrderClose;

                   req.Status = new OptionSetValue(100001);

                   FulfillSalesOrderResponse response = (FulfillSalesOrderResponse)service.Execute(req);

               }

    ==========

    Hope this helps.

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at

    On which message you have registered plugin?

    It will be helpful if you share your code. Thanks

  • Community Member Profile Picture
    on at

    Hi Ravi,

    I just noticed that it throws same error even if I remove plugin. I have tried with another blank trial account. It throws same error.

    Can you please suggest? Is it error of CRM itself?

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Chhaya,

    Have you changed your code as suggested above i.e. instead of chaing the status directly use fullfillsalesorder request message? Could you please share some more details from where you are setting the status? Are you saying that you are getting the same error message from UI?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans