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

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

Set ReturnItemNum(RMA) number same as Sales order number when we create new return order

(0) ShareShare
ReportReport
Posted on by 143

[FormEventHandler(formStr(SalesCreateOrder), FormEventType::PostRun)]
    public static void SalesCreateOrder_OnPostRun(xFormRun sender, FormEventArgs e)
    {
        FormStringControl   salesid =   sender.design(#zero).controlName(#saleid);
        FormStringControl   rma     =   sender.design(#zero).controlName(#rmaId);
        rma.text(salesid.valueStr());
        rma.allowEdit(false);
    }

Hi Experts,

I want to set the ReturnItemNum (RMA) same as the salesid when we create new return order.

I already set the Return order number sequence manual than I set the value of returnItemNum same as the sales order number on run method of form but it's not working, returnItemNum is showing blank when I open the form. I'm getting the salesId on run method but not been able to set it on returnItemNum control.

I have the same question (0)
  • Mea_ Profile Picture
    60,284 on at
    RE: Set ReturnItemNum(RMA) number same as Sales order number when we create new return order

    Don't modify control, change datasource field instead.

  • Vishu Beniwal Profile Picture
    143 on at
    RE: Set ReturnItemNum(RMA) number same as Sales order number when we create new return order

    Hi Thanks for the reply but then how i'll set the ReturnItemNum same as the salesid

  • Verified answer
    Mea_ Profile Picture
    60,284 on at
    RE: Set ReturnItemNum(RMA) number same as Sales order number when we create new return order

    You need to find where salesid is set and assign the value to rma. Probably, after create of data source. Just assign it to data source field instead of a form control.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 810

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 243 Super User 2025 Season 2

#3
Sagar Suman Profile Picture

Sagar Suman 217 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans