Hello,
I have encountered a couple of different problems through BOM scripting that I am looking for help with.
In both cases, the item is added to the BOM, but the field SO Line Item Number is blank (It is a single line text field). I'm not sure what I am doing wrong here.
2. I have found that quote IDs using item.boms[i].quote.id and by using item.boms[i].item.sourcing[i].quote[i].id do not always match up. For instance:
I have an item that has one source with two quotes attached to that source. Through testing I have found the following:
The quote ID from the BOM does not match any of the quote IDs from the item's sourcing tab, though the other properties match that of the sourcing quote with the ID 4172. Is there a reason behind this. I need these to match as I am creating a script to run through items in a BOM and determine the supplier of each item.
Any help would be greatly appreciated!!
Matt
After more testing, I have found the problem with the quote IDs not matching. It has to do with the revision of an item and the default quote. When an item is added to a BOM, if a quote is not selected and the default quote is used, item.boms[i].quote.id is linked to the working revision of the item and not the revision of the item that is listed on the BOM. However, item.boms[i].item.sourcing[i].quote[i].id is linked to the revision of the item that is listed in the BOM. This is the reason that the quote IDs are not matching up, which is a problem.
With that being said, is there any way to make the default quote in the BOM be linked to the revision of the item that is listed in the BOM instead of the working revision?
I am still searching for an answer to adding custom fields with addBOM.
Thanks for any help!
Matt
Hi Matt,
We are evaluating the quotes matter. May we contact you direct in case we have additional questions or need to understand intent?
>> I am still searching for an answer to adding custom fields with addBOM.
We've identified this is a defect and are investigating root cause. Can you confirm that SO_LINE_ITEM_NUMBER is NOT read-only field? In the meantime, consider updating custom fields after calling addBOM call.
Regards,
Sorry to dig up an old thread but it seems related to problems we are having now.
We are trying to create BOM lines via scripting, including populating a couple of custom fields at the same time. We couldn't get this to work by including the values in the initial addBOM call and based on Martin's comment from 2014 we have also tried to set the custom field values in separate lines afterwards, but it is still not working.
It's almost like newly created BOM lines are not immediately available to a scripting session. The same code will write to existing BOM lines if run in a separate script so it sure seems like it should work. Is this an in-session limitation?
Thanks.
Joe Hendrickson