Hi There,
I just try to read custom sublist value and the result is undefined.
For my case :
In Sales Order Transaction :
I add 4 custom body field on Sales Order (Item Name, Quantity, Rate and Amount), for that 4 custom body field is copy from Line 0 (zero) on item sublist.
I use script on SublistChange on type Client
function sublistChanged(context) {
var currentSO = context.currentRecord;
if (context.sublistId == ‘item’){
var rateLine = currentSO.getSublistValue({
sublistId : ‘item’,
fieldId : ‘rate’,
line : 0
});
currentSO.setValue(‘custbody_gsu_rate_body’, rateLine);
var amountLine = currentSO.getSublistValue({
sublistId : ‘item’,
fieldId : ‘amount’,
line : 0
});
currentSO.setValue(‘custbody_gsu_body_amount’, amountLine);
var quantityLine = currentSO.getSublistValue({
sublistId : ‘item’,
fieldId : ‘quantity’,
line : 0
});
currentSO.setValue(‘custbody_gsu_body_quantity’, quantityLine);
var itemLine = currentSO.getSublistText({
sublistId : ‘item’,
fieldId : ‘item’,
line : 0
});
currentSO.setValue(‘custbody_gsu_body_item_order’, itemLine);
}
}
and that script work to copy from line 0 sublist to body sales order,
But when i try this case on Customer Payment, i just get undefined when getSublistValue.
Anyone can read getSublistValue from customSublist?
Best Regards