Announcements
No record found.
Hello ,I have written a logic on sales confirm button in SalesTable form before next but logic is executing after run method.
Can you suggest
Hi Harish, Can you share your code and the run method that you are referring.
[ExtensionOf(classStr(SalesFormLetter))] public final class SalesFormLetter_CAP_Extension { public void run() { SalesLine salesLine ; ReasonMain_CAP reason_Cap; PriceChangeHistory_CAP priceChangeHistory; Dialog dialog; Dialog dlg = new Dialog('@CAP:DialogCaptionInDialogSalesPrice'); DialogField dfReasonCode = dlg.addField(extendedTypeStr(ReasonCode_CAP),'ReasonCode'); FormBuildCommandButtonControl OkButton; OkButton = dlg.formBuildDesign().control( 'OkButton'); //Disable the Cancel button if (salesLine.orig().SalesPrice != 0) { if(dlg.run()) if (dfReasonCode.value() != '' ) { ttsbegin; dlg.closedOk(); priceChangeHistory.ReasonCode = dfReasonCode.value(); priceChangeHistory.CurrencyCode = salesLine.CurrencyCode; priceChangeHistory.OrderNumber = salesLine.SalesId; priceChangeHistory.ItemNumber = salesLine.ItemId; priceChangeHistory.LineNum = salesLine.LineNum; priceChangeHistory.OriginalPrice = salesLine.orig().SalesPrice; priceChangeHistory.UpdatedPrice = salesLine.SalesPrice; priceChangeHistory.ReferenceType = '@CAP:SalesOrder'; priceChangeHistory.CreateDateTime = today(); priceChangeHistory.RecIDSales = salesLine.RecId; priceChangeHistory.TableIDSales = salesLine.TableId; priceChangeHistory.RecIDPriceChange = priceChangeHistory.RecIDPriceChange 1 ; priceChangeHistory.CreateBy = curUserId(); priceChangeHistory.insert(); ttscommit; } else { salesLine.SalesPrice = salesLine.orig().SalesPrice; Error('Please fill the reason code'); } } next run(); } }
Hi Mohit,
I need that my dialog window should open before the standard run method call.
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.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 558 Super User 2026 Season 1
Giorgio Bonacorsi 402
Diego Mancassola 261