oShipLines.nCopyLinesFromSalesOrder(soOrder) is copying an extra line

SOLVED

Hi Forum,

I am using .nCopyLinesFromSalesOrder(soOrder) to bring in all lines from the Sales Order into Shipping Invoice data entry and every order I import is duplicating the lines.

Any advice on this will be greatly appreciated.

Regards,

Manuel

Top Replies

Parents
  • 0

    It sounds like the .nCopyLinesFromSalesOrder(soOrder) method is duplicating lines when you import them from the Sales Order into the Shipping Invoice in your system. This could be due to a few reasons, such as issues with how the method is called or a potential bug in the script.

    Here are a few steps you can take to troubleshoot and resolve this issue:

    1. Check How the Method is Called: Make sure that the method .nCopyLinesFromSalesOrder(soOrder) isn't being called more than once in your script or workflow inadvertently.

    2. Review the Method's Configuration: Sometimes, methods like these can have configuration settings or parameters that determine how they operate. Ensure there are no settings that might cause line duplication.

    3. Examine Event Triggers: If this method is triggered by an event (like a button press or a field update), ensure the event is not firing multiple times. For example, a button might be clicked twice, or a field update might be triggering the method unexpectedly.

    4. Look for Loops: If the method call is inside a loop, make sure the conditions governing the loop are correct and not resulting in repeated method calls for the same order.

    5. Check for Software Bugs: There might be a bug in the software you are using. Review the software's documentation or support forums for any known issues. Contacting support with a detailed description of your issue might also uncover a solution.

    6. Log and Debug: Add logging before and after the method call to see exactly when it's called. This might help you identify unwanted multiple executions.

Reply
  • 0

    It sounds like the .nCopyLinesFromSalesOrder(soOrder) method is duplicating lines when you import them from the Sales Order into the Shipping Invoice in your system. This could be due to a few reasons, such as issues with how the method is called or a potential bug in the script.

    Here are a few steps you can take to troubleshoot and resolve this issue:

    1. Check How the Method is Called: Make sure that the method .nCopyLinesFromSalesOrder(soOrder) isn't being called more than once in your script or workflow inadvertently.

    2. Review the Method's Configuration: Sometimes, methods like these can have configuration settings or parameters that determine how they operate. Ensure there are no settings that might cause line duplication.

    3. Examine Event Triggers: If this method is triggered by an event (like a button press or a field update), ensure the event is not firing multiple times. For example, a button might be clicked twice, or a field update might be triggering the method unexpectedly.

    4. Look for Loops: If the method call is inside a loop, make sure the conditions governing the loop are correct and not resulting in repeated method calls for the same order.

    5. Check for Software Bugs: There might be a bug in the software you are using. Review the software's documentation or support forums for any known issues. Contacting support with a detailed description of your issue might also uncover a solution.

    6. Log and Debug: Add logging before and after the method call to see exactly when it's called. This might help you identify unwanted multiple executions.

Children
No Data