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
krish99krish99 

records moving from one object to another object

HI,

    I am having invoices object in that a  field called Balance due when i enter amount in that field and click on save ,  at that time the record   have to move from invoices object to amount object how can i achieve this.

JK84JK84
Hi,

Try writing an after update trigger on Invoices object, check if the amount is updated, and then copy the contents of the record and insert it to amount object.
krish99krish99

@jk84

 

 

      could you please sample code for this..

JK84JK84

Hi,

 

The following link has the sample code to delete the record which got updated, and you might have to just add few more lines to insert the record to amount object.

 

http://techman97.wordpress.com/2012/03/29/deleting-a-record-from-its-own-update-trigger/