Clone a record under a form

I have a system designed to make offers to customers. The main part is on a big form with lots of fields. Sometimes I need to pull up an old offer, and then duplicate it, just changing the date and the offer number. What is the most elegant way of getting a form to re-write the data in it as a new record instead of saving it as the old one.


// change the date and offer number …
// dd contains today’s date
// newNumber contains new offer number


// NOW save the form data as a new record instead of updating the old
// the underlying table has a uniqueID (offerID)

You can use

form.setItemValue('OFFER_DATE',dd); form.setItemValue('OFFER_NUMBER',newNumber); form.resetDataProcessor("inserted"); //will reset form and process it as new data;

Perfect Stanislav
Thank you v. much!