AnsweredAssumed Answered

Duplicate Order x number of times

Question asked by on Jun 8, 2017

Hello Everyone.


I need help in duplicating an order.


I have an portal which allows users to input order for the customer. I have an quantity field in that portal. What I would like is when I click in save order button, that order to be duplicated to number of times of quantity field.


In below example, I placed an order for computer and entered quantity  of 3, but it saved one order. I would like to be saved as 3 different orders.

This is because each computer would have different serial number.


I was thinking to go to order portal, loop through each record one by one and if it has quantity, duplicate it.


I have script which does following


>>Go to order portal (new order portal)

>>Enter loop

>>commit record

>>If record has quantity more than 1

     >>enter loop

     >>Go to card layout and find that record

     >>Duplicate that record

     >>end loop

>>close card window


>> go to next portal(new order portal) row -> exit loop after last. 



I have also attached this file.



Thank you in advance.