19
Points
Questions
3
Answers
3
-
Thank you this does help but I did get an example that I started working with. It was “AddDocNewPartPX” This works when creating a new part after I set it to activate only on a specific part type of SellableItems. The example is pointing to PCBA.
My big issue is I can get it to work on a single part number and once that part number is used it can not be used again, even if I create a new number that is different. For example I built part 123.1 and it creates the part 500.1212
I then create a new part 124 and it should add 500.1212 to the BOM but it won’t.Now if I go back into the code and update part 500.1212 to 500.1213 or any other number it will work one time. And from that point forward part 500.1213 is not going to work on any other number.
Here is the part I chanced from the example:
// Create a new item and add it to the item BOM
IAgileClass itemclass=admin.getAgileClass(ItemConstants.CLASS_PART);
//IAutoNumber docNumber = docclass.getAutoNumberSources()[0];
String docNumber = “500.1212” + ” “;
IItem item = (IItem) session.createObject(itemclass, docNumber);
ITable tab = part.getTable(ItemConstants.TABLE_BOM);
tab.createRow(item);
obj.logMonitor(“Succeed to add document ‘”+ doc.getName() +”‘ to item ‘”+part.getName()+”‘”);- 1667 views
- 3 answers
- 0 votes
-
- 1998 views
- 4 answers
- 0 votes
-
Thank you Steve this helps a little but I am looking to go deeper into the collection. So I started a Advanced search to begin at the Manufacture Part and in the connection I made a relation ship to Parts.
I have screen shots attached.
The main goal is to see my Items numbers that have associated manufacture part numbers and if the folder description for the attachment of the manufacture part is MCD.
Right now with my current search I can get all the manufacture part numbers that have a folder description of MCD. It getting the Item number that is associated with it where it breaks.
As soon as I add the item number from the relationship fields it goes from 2075 records to 0.Any suggestions would be welcome
- 1998 views
- 4 answers
- 0 votes