Notifications
Announcements
No record found.
[ExtensionOf(formStr(SalesCopying))] final class SalesCopying_Extension { void init() { next init(); } /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> [FormControlEventHandler(formControlStr(SalesCopying, OK), FormControlEventType::Clicked)] public void OK_OnClicked(FormControl sender, FormControlEventArgs e) { SalesId sid=salesTable.SalesId; FormRun formRun = sender.formRun() as FormRun; FormDataSource formDataSource; Common common; formDataSource = formRun.dataSource(formDataSourceStr(SalesCopying, SalesTable)); common = formDataSource.cursor(); if (common) { str headerField1 = common.(fieldNum(SalesTable, SalesId)); info(strFmt("Selected header: %1", headerField1)); } } }
Hi Martin, thank you. I followed the suggested solution, but I'm still having trouble retrieving the selected sales order from the grid. Could you please assist me with this? I was able to update a record successfully.
public void copy() { next copy(); str refId = SalesLine::find(salesTable.SalesId).InventTransIdReturn; str salesId = InventTransOrigin::findByInventTransId(refId).ReferenceId; salesTable.WorkerSalesResponsible=5637147530; //Need to set from the ref transaction this.updateHeader(); info(strFmt("Ref Sales order Id: %1", this.salesTable.WorkerSalesResponsible)); info(strFmt("Sales order Id: %1", salesId)); }
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 551 Most Valuable Professional
André Arnaud de Cal... 450 Super User 2025 Season 2
BillurSamdancioglu 278 Most Valuable Professional