How do you access the Current Revision sublist field on the Assembly Item record under the Manufacturing tab on the BOM sublist via scripting?
To anyone who has Advanced BOMs turned on, do you know of a way to access the Current Revision sublist field via scripting? It is on the Assembly Item record under the Manufacturing tab on the Bill of Materials sublist. I seem to not even be able to see the Manufacturing tab on the form itself when I edit it, and I cannot find anywhere that has an internal id for that field or the sublist.
Try this:
var record = currentRecord.get(); var sublistValue = record.getCurrentSublistValue({ sublistId: 'billofmaterials', fieldId: 'currentrevision' });
Thank you for your answer. Is it possible to find this field through a scripted search or a lookupfields?
Assuming the one that appears as “current” is just the active one, I think the below should work:
var bomrevisionSearchObj = search.create({ type: "bomrevision", filters: [ ["billofmaterials.restricttoassemblies", "anyof", "#####"], "AND", ["isinactive", "is", "F"] ], columns: ["billofmaterials", "name", "isinactive"] });
value in field restricttoassemblies is not ID of item