Adding an item on the sales order based on previous items on that sales order with Line Looping

Kate L. Barron

Dear Boyum,

I'm not sure I'm approaching my task correctly.  I'm trying to auto populate a line on the sales order with a particular item code based on other item codes previously selected on the sales order.  I started by creating a B1 Validation using a Case SQL Statement listing the items that need to be present for adding another line on the sales order based on those items previously selected on the sales order.   See my B1 Validation screen below. 

Then I created a line loop for a SQL condition.  See this screenshot below. 

Here's my second UF within the Line Loop UF for my set command. 

Can you help me resolve this issue or should I be taking a different approach?  

Thank you,
Kate

 

 

 

 

 

 

 

But I'm getting a syntax error when testing it on a sales order.   I created the sales order, select just one of the items and get this error message see this screenshot below as well. 

 

 

 

 

Comments

1 comment

Please sign in to leave a comment.