Skip to Content
author's profile photo Former Member
Former Member

BOM verification before saving

Hi,

I need to do BOM adjustments with program code. Because there is no way remove or update a BOM line with code, I have to copy the original BOM to another BOM making changes along the way. When done I have to remove the original BOM and then save the new BOM with the same key item ID as the original BOM. My problem is that if something goes awry and I can't save the updated BOM, there is no way to recover the original BOM. Is there a way to test the integrity of the updated BOM without adding it to the BOM collection?

Thanks,

Mike

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 05, 2007 at 05:46 PM

    Hi Mike,

    I am not sure if this will work and you can maybe test it, but have you tried using the Transactions that forms part of the DI API? Look at Company.StartTransaction in the help file.

    Hope it helps,

    Adele

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Adele,

      Thanks for the suggestion. I did use a transaction and it appears to have worked well. While I was deleloping the code to do the BOM update, I had a few instances where it appeared to have rolled back when my code did something bad. But what is the best way to really test it? A BOM-to-BOM copy appears to be more tolarent than a BOM-to-PdO copy. What is a good data way to test the a BOM-to-BOM copy. Can I have the confidence that if my code encounters a situation I didn't acticipate, it will rollback?

      Transactions appear to be problematic to test.

      Thanks,

      Mike

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.