DictType dictType = new DictType(_arrayFieldTypeId);
Source s = strfmt('%1 c2a(container _arrayData) \n',dictType.name());
s += '{ \n';
s += ' int i; \n';
s += strfmt( ' %1 anArray; \n',dictType.name());
s += strfmt( ' for (i = 1; i <= %1; i++) \n',dictType.arraySize());
s += ' anArray[i] = conPeek(_arrayData,i); \n';
s += ' return anArray; \n'; s += '} \n';
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(); ...