Is it possible to directly access the Supplier/Part Number field in a BOM via scripting? The only way I have found to access this information is to compare the Quote from the BOM item using item.boms[index].quote to the sourcing quote of the item using item.boms[index].item.sourcing[index].quote[index]. The supplier can then be pulled from the second Quote. However, this method includes many loops and I am having script timeout issues for longer BOMs. Can someone provide some insight on a better/more efficient way to do this?
Thanks!
Matt
Hi Matt,
Presently, traversing over the suppliers' quotes is the only way to get to supplier number for a given bom component. Absolutely, there is value in providing direct scripting access to supplier for the in-use quote of a bom component. This would eliminate looping over all quotes of all suppliers for each bom component to find a match. I will add this on my roadmap for future release.
Tentatively, the form would likely be in the lines of:
• item.boms[i].quote.sourcing.supplierPartNumber; // or get to the supplier's part number directly
• var supplier = item.boms[i].quote.sourcing; // (read-only) access sourcing object to retrieve supplier or any other field or its list of quotes
Thanks and best regards,
--
Martin Gasevski | Product Manager | Autodesk PLM 360
Hi Martin,
Thanks for the update. Direct access to this information would be very helpful in simplifying scripts and cutting down on the number of loops needed.
Thanks,
Matt