Hi Experts,
I have a requirement that I have created a button on my form where I need to process the records based on a condition when the user press the button. I don't know how to select the records in the clicked methods (in other words arguments for clicked method).
Example:- SalesLine form, I need to select first 5 items by comparing line number with my counter and process them to update something else.
how to select the records of the respective sales order in the clicked method of the button ?
void clicked()
{
SalesLine salesline;
super();
while select forupdate salesline where salesline.linenum <= MyCounter
{
// do some update;
}
}
how to pass arguments to select only particular sales order, Thanks in advance
Hi AX Beginner,
If you are on the sales order form, you can get order number using "salesTable.SalesId". You also won't be able to use the variable salesLine in the clicked method as SalesLine is also the name of the data source.
But since you are updating records, it might be a better option to create an action menu item and pass the data source as an argument. You can take a look at CheckCrediLimit button as an example. You can check the menu item (as highlighted) and the class it calls to check credit limit.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156