Hello! Im trying to get the id of the inventory se...
# suitescript
i
Hello! Im trying to get the id of the inventory serial/lot number of item receipts, Im having trouble getting it from the IR record, im using this on an UE afterSubmit
Copy code
inventorySubrecord.getSublistValue({
                        sublistId: 'inventoryassignment',
                        fieldId: 'receiptinventorynumber',
                        line: j,
                    });
But this gets me the text, I deployed the same script for an invoice just changing the field id to issueinventorynumber and it works but for some reason it doesnt on the IR record. Another issue is that for the item sublist, I cant get the text on the IR, this code gets me just the id on both Value/Text on the IR bu on the Invoice it does work I do get the id/text respectively but for the item receipt for both im getting the item id
Copy code
const itemId = newRecord.getSublistValue({
                    sublistId: 'item',
                    fieldId: 'item',
                    line: i,
                });
                const itemText = newRecord.getSublistText({
                    sublistId: 'item',
                    fieldId: 'item',
                    line: i,
                });
Any idea what should I do to make it work?