In my first event handler, I will collect all the fields I need from the SalesTable form. In this form, I need to get these fields from the SalesLine. Below is my code:
[FormEventHandler(formStr(SalesTable), FormEventType::PostRun)]
public static void SalesTable_OnPostRun(xFormRun sender, FormEventArgs e)
{
SalesLine salesLine;
SalesTable salesTable = sender.dataSource(formDataSourceStr(SalesTable,salesTable)).cursor();
select ItemId, SalesId, ShippingDateConfirmed from salesLine
where salesLine.SalesId == SalesTable.SalesId;
}
After that, this next event handler is the OnClick event of a button found in another form..
[FormControlEventHandler(formControlStr(SalesAvailableDlvDates, TransferToConfirmedButton), FormControlEventType::Clicked)]
public static void TransferToConfirmedButton_OnClicked(FormControl sender, FormControlEventArgs e)
{
//some code here
}
In this event handler of a different form which is SalesAvailableDlvDates, here I need the fields from my SalesLine table which I obtained from the SalesTable form. Because in here, this is the button needed to be triggered where this will place values into a newly created table.
Is there anyway I can pass the values from the SalesTable event handler to the SalesAvailableDlvDates event handler?
Because in SalesAvailableDlvDates, I COULD NOT obtain the SalesLine data. Is it possible to pass values from one event handler to another?
In
SalesAvailableDlvDates
form event handler you can obtain the form caller. Then ifsalesCalcAvailableDlvDates
is aSalesCalcAvailableDlvDates_SalesTable
orSalesCalcAvailableDlvDates_SalesLine
you can get data you needed from the correspondingparm
method.