Duplicate Bid
Posted: Thu Nov 18, 2010 7:57 pm
I'd like the ability to duplicate an entire bid.Perhaps this is already possible.
Anyone know how this may be done?
Thanks
Z
Anyone know how this may be done?
Thanks
Z
Support for SeedCode
http://archive.seedcode.com/support/
http://archive.seedcode.com/support/viewtopic.php?f=25&t=3118
John Sindelar wrote:Duping entities with related records tends to be a logic problem, more than about tricky calculations. So I generally do it like this:
1. Use GoToRelatedRecord to go to the bid on the ProjectBids layout. From the bid go to the related line items: this Go To Related Record makes them the found set.
2. Return to the bid layout. Duplicate the bid.
3. Store the ID of the new bid in a global variable or global field.
Haven't had any luck with this. Can you suggest some script steps that might accomplish this?
4. Move to the ProjectBidLines layout where your found set is waiting.
5. Sort these in reverse serial number order.
6. Go to the last record.
7. Start your loop. Dupe the record and set the new bid ID in from your global variable or global field.
again, I'm stuck here.
8. Call the omit record step twice: leaving you again on the last record.
9. Exit your loop when the Found Count is zero.
10. End your loop and return to the bid layout.
The only trick here is the reverse sort. We do this so our newly created bid items have the same creation order as the ones in the bid we duplicated.
Hope that helps,
John