function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to clone the last 6 Order???


i have sales Order and Sales Order Lines there is a Master detail relationship between when i click cloneOrder detail page button on Sales Order page the latest 6 Order should be clone with Account information and sales order lines should be clone for the particuler Order.

if suppose 

1st sales order have 5 sales orderlines.

2nd sales order have 3 sales order lines.

3rd sales order have 6 sales order lines

and so on up to 6 records.

wen i click CloneOrder button 6 recently create orders should clone with Account information and for the partculer order order lines should be clone.

would you please any one help me.

thanks in advance...


I guess it should be possible with some coding in Visualforce/Apex.

Andy BoettcherAndy Boettcher

How are you defining "the last 6 orders"?