Hi, Readers
Requirment:-Need to develop functionality to update the below date fields on all the selected PO lines.
o here’s what you need to develop.
On the Purchase order form, create a drop down form, and add the columns we need to update (highlighted fields from the above screenshot) on that drop dialog.
1.PurchTable_Extension --Clicked Method extension
[ExtensionOf(formcontrolstr(PurchTable,MassUpadte))]
internal final class ValleyForge_Extension
{
/// <summary>
/// update button clicked method.
/// </summary>
public void clicked()
{
next clicked();
PurchLine purchline;
FormRun formrun;
Args args = new Args();
args.name(formstr(DropDilogForm));
args.record(purchline);
args.object(element);
formrun= classFactory.formRunClass(args);
formrun.init();
formrun.run();
formrun.wait();
}
2.Drop dilog form ==Clicked method
/// <summary>
///clicked method on update button.
/// </summary>
public void clicked()
{
super();
formrun = element.args().caller();
FormDataSource fds = formrun.dataSource('purchline');
PurchLine purchlineloca;
//str value2 = formrun.args().parm() ;
// con = str2con(value2,";");
MultiSelectionHelper helper = MultiSelectionHelper::construct();
helper.parmDatasource(fds);
purchlineloca = helper.getFirst();
while (purchlineloca)
{
select forupdate purchline where purchline.InventTransId == purchlineloca.InventTransId;
ttsbegin;
purchline.DeliveryDate = DeliveryDate.dateValue();
purchline.ConfirmedDlv = ConfirmedDeliveryDate.dateValue();
purchline.update();
ttscommit;
purchlineloca = helper.getNext();
}
element.closeOk();
}
No comments:
Post a Comment