Hello:
I've dynamically added a button to my VendInvoiceJour form to call another form B for additional data. This form B relates to the VendInvoiceJour RecId.
In the click method of the dynamic button I have put the following code, but when calling it does not bring me in correct registration but another one. This despite making Select with the RecId of VendInvoiceJour and passing the result of the query to form B:
Your help please.
void GNP_VendInvoiceJourAddData_Clicked(Args _args)
{
Form formAddData;
Args args;
Object formRun;
GNP_VendInvoiceJourAddData gnp_VendInvoiceJourAddData2;
GNP_VendInvoiceJourAddData arg_VendInvoiceJourAddData2;
;
args = new Args();
select firstOnly gnp_VendInvoiceJourAddData2 where gnp_VendInvoiceJourAddData2.VendInvoiceJour == VendInvoiceJour.RecId;
args.name(formstr(GNP_VendInvoiceJourAddData));
//args.record(GNP_VendInvoiceJourAddData::find(VendInvoiceJour.RecId));
args.record(gnp_VendInvoiceJourAddData2);
if (args.record() && args.dataset() == tableNum(GNP_VendInvoiceJourAddData))
{
arg_VendInvoiceJourAddData2 = args.record();
}
args.caller(this);
formRun = classfactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.wait();
formRun.detach();
}

You should return the CodeTypeProofPayment = "07" but instead bring "01".


*This post is locked for comments
I have the same question (0)