I'd like the ability to duplicate an entire bid.Perhaps this is already possible.
Anyone know how this may be done?
Thanks
Z
Duplicate Bid
12 posts
• Page 1 of 1
Posts: 15
Joined: Tue Nov 16, 2010 10:55 am |
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Hi Z,
You'd need to write a script for this as there isn't one already. Let me know if you get stuck and I'd be glad to help. John John Sindelar
SeedCode |
Posts: 15
Joined: Tue Nov 16, 2010 10:55 am |
Thanks John,
I seem to be stuck hard. I'm fairly new to FM Dev, scripting has yet to become natural and I am unfamiliar with the separation model that Seedcode is using. Can you point me in a good direction here Thanks for your support- Z |
Posts: 15
Joined: Tue Nov 16, 2010 10:55 am |
Addition to previous post.
I can script my way to the related Bid in the ProjectBids Table however I can't seem to pick up the Bid ID for duplication. SO my duplicate record is based on the Project ID. I've tried about every step I can think of. Thanks again- Z |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
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. 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. 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 John Sindelar
SeedCode |
Posts: 15
Joined: Tue Nov 16, 2010 10:55 am |
Thanks for the support- Z |
Posts: 15
Joined: Tue Nov 16, 2010 10:55 am |
I'm also attempting to add Bid Lines 'allow creation of records via relationship' in the bid lines portal. This works for the first Bid however, subsequent bids do not.
We create many bids daily, some with hundreds of line items. Click the +new button is so inefficient. I can get a OnObject script trigger to do the work but then we can end up with a lot of extra lines to delete when one goes back to modify a line. Any advise is greatly appreciated. Thanks Z |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Allow creation of related records doesn't work on filtered portals, unfortunately. If you really make that many lines, you could write a script that offers a custom dialog asking how many lines to create (50?) and the makes as many blank lines as you need: you the tab through entering data.
John Sindelar
SeedCode |
Posts: 15
Joined: Tue Nov 16, 2010 10:55 am |
I can duplicate the bid record however, I'm having difficulties applying the correct script steps to duplicate all the bid lines. Here's a screen shot of my script. Highlighted area is obvious failure point. I've tried both global variables and global fields to store the Bid ID.
Any assistance in identifying the correct scripting would be helpful and appreciated. The ability to duplicate bids [to accommodate quick revisions] would be a great feature upgrade. For us anyway. Perhaps it's not widely utilized. Thanks Z[/img] |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Hey Z,
Take a look at the attached script. Note that we record the newly created bid's ID into the same global field we use to hold the selected bid after the comment "Select the new bid". This not only selects the new bid so the user has it highlighted, but gives us a place to store the bid's ID so we can use it later after the comment "Set the new bid ID". Note that you could use the same logic to dupe an Invoice except that we don't "select" invoices the way we do bids: we're either on an invoice record or we're not. Hope it helps. http://www.seedcode.com/support/images/ ... upeBid.pdf - John John Sindelar
SeedCode |
Posts: 15
Joined: Tue Nov 16, 2010 10:55 am |
Thank you John!
The script works beautifully. Your responsive support is as amazing as your product. Both have far exceeded my expectations. I look forward to utilizing more of your products soon. Thanks again- Z |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Thank YOU, Z!
John Sindelar
SeedCode |
12 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests