Hello All,
I have added button in production order listpage and on button click i have to update few data on all production order selected in listpage. But I am getting error when I am trying to retrieve datasource of listpage "ProdTable_ds".
class CreateProductionGroupId
{
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
[FormControlEventHandler(formControlStr(ProdTableListPage, SAB_ProductionOrder), FormControlEventType::Clicked)]
public static void GroupProductionOrder_OnClicked(FormControl sender, FormControlEventArgs e)
{
ProdTable prodTable,prodTable1;
NumberSeq numberSeq;
SAB_ProdGroupId num;
int flag;
;
for(prodTable=getFirstSelection(ProdTable_ds); prodTable;prodTable=ProdTable_ds.getNext())
{
if(flag==0)
{
numberSeq = NumberSeq::newGetNum(ProdParameters::numRefGOD_ProdGroupId());
num = numberSeq.num();
}
prodTable1 = prodtable::find(prodTable.ProdId);
if(prodTable1)
{
ttsbegin;
prodtable1.GOD_ProdGroupId = num;
ttscommit;
}
flag++;
}
flag=0;
}
}
Please Help
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,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156