DialogField DialogFromDate,DialogToDate;
// DateTimeUtil fromDate;
// DateTimeUtil toDate;
FromDate fromDate;
ToDate toDate;
DateTimeAccepted tmpdate;
protected Object dialog()
{
Object ret;
DialogRunbase dialog; //= super();
;
Dialog = super(dialog);
Dialog.caption("Percentage Calculation");
DialogFromDate = dialog.addField(typeid(FromDate));
DialogToDate = dialog.addField(typeid(ToDate));
return dialog;
}
public boolean getFromDialog()
{
boolean ret;
ret = super();
fromDate=dialogFromDate.value();
toDate=dialogToDate.value();
return ret;
}
public container pack()
{
container ret;
// ret = super();
return ret;
}
To Cancel Deliver Remainder through X++ you can use below code sample. Thanks. static void _CancelDeliverRemainder_Sales(Args _args) { SalesLine SalesLine = SalesLine::find('SO0013', true); ; if (SalesLine) { // Set remaining inventory Qty to zero SalesLine.RemainInventPhysical = 0; // Set remaining physical Qty to zero SalesLine.RemainSalesPhysical = 0; // We have to cancel the SalesLine SalesLine.PurchStatus = PurchStatus::Canceled; SalesLine.update(); ...