Clone subform subform?

Clone subform subform?

Postby mobilemcclintic » Fri Jul 07, 2017 2:34 am

Hello, I have a 3 level application
Quote
--Quote Items
----Quote Item Detail

Each quote may have many items and each item may have many details, (all the pieces or services that the item needs)
I can clone a quote and it clones the quote items, but it doesn't clone the quote item details.
Is there a way to programmatically make this work?
mobilemcclintic
 
Posts: 54
Joined: Fri Oct 23, 2015 8:04 am

Re: Clone subform subform?

Postby mobilemcclintic » Sat Aug 05, 2017 4:15 am

Obviously this musn't be supported in Nubuilder.
Is there a way to set an original ID before clone onto subform records so that I can run a php before open code to populate necessary fields?
I tried adding the code to change subform fields using nuOnClone as well as trying a custom extra action button that updates the subform fields before cloning, but since clone doesn't save the record, the updated fields aren't populated on the new record.
I tried to update the fields, save, and then clone on the extra action button as well, but it just updates the fields, clones the form (except the updated fields), and then attempts to save the form.

My next plan of action is figuring out timing of when to fill in an auxiliary field on the subform records with the subform record's _nuPrimaryKey so that I can systematically run a php script to update the fields with a query before open on the subform records full edit page.
I am trying to avoid having 50 or more fields on the subform which would allow easier cloning of the full record (except for grandchild records)
mobilemcclintic
 
Posts: 54
Joined: Fri Oct 23, 2015 8:04 am


Return to Custom Code