Skip to main content

Notifications

Announcements

No record found.

Supply chain | Supply Chain Management, Commerce
Unanswered

Help with Commerce Runtime Extension.

Posted on by
Hello Fellow Forum Members,
 
I am trying to implement a CRT (Commerce Runtime) extension that cancels a outbound transfer is the quantity of that transfer is greater than 50 units. I was wondering if someone could help me out here. I am newer to this platform and C# in general.
 
Here is my code so far:
public async Task OnExecuting(Microsoft.Dynamics.Commerce.Runtime.Messages.Request request) {    if (request is CommitInventoryInboundOutboundDocumentOperationRequest commitInventoryInboundOutboundDocumentOperationRequest) {        String documentId = commitInventoryInboundOutboundDocumentOperationRequest.DocumentId;        var inventDocumentRequest = new GetInventoryInboundOutboundDocumentRequest(documentId, false);        var inventDocumentResponse = (await request.RequestContext.Runtime.ExecuteAsync<EntityDataServiceResponse<InventoryInboundOutboundDocument>>(inventDocumentRequest, request.RequestContext).ConfigureAwait(false));        //Whats next?    }}
Hastebin:
https://www.toptal.com/developers/hastebin (REMOVE THE ENDING / FROM THE URL :D)
 
Thank you all so much have a great one!

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,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans