Deleting a Relationship for Previous Generations

Hi! How can I remove a BOM relationship for previous generations of a Part? I tried to write a SQL Query but I couldn't mange it. thanks  
  • Manipulating previous released Generations of an Item is not recommended. But if you really need to fix a previous generation for once, you can do this with applySQL. Something like this may work:
    
    string bomId = "1234567889............"; // id of BOM relationship in your previous generation. Not ID of related Part!
    string mySQL = "DELETE FROM PART_BOM WHERE [ID]='" + bomId +"'";
    Item  myResult = this.getInnovator().applySQL(mySQL);
    Please be aware, that your existing Change Managment processes may contain invalid information. MPP process plans may become corrupted. You can really produce many negative side effects when manipulating previous Part versions the db. So you really need to take care what you do!
  • Hi Duygu, Angela is correct about the potential dangers of modifying previous versions of an item via direct SQL. If you absolutely have to modify data via SQL, it's a good idea to backup your database first so you can roll back if necessary. If this data is in a production system, it may be better to contact Aras Support ([email protected]) to see if they can help you correct the data with a less risky approach. Eli
    Eli Donahue Aras Labs Software Engineer