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.

Rookie Asked on November 11, 2019 in SuiteScript.
Add Comment
2 Answer(s)

Try this:

 


var record = currentRecord.get();

var sublistValue = record.getCurrentSublistValue({

sublistId: 'billofmaterials',

fieldId: 'currentrevision'

});

Beginner Answered on November 12, 2019.

Thank you for your answer. Is it possible to find this field through a scripted search or a lookupfields?

on November 12, 2019.
Add Comment

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"]
});
Intermediate Answered on November 12, 2019.

value in field restricttoassemblies is not ID of item

on August 17, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor