You need to sign in to do that
Don't have an account?
Apps Hero
Inserting a a record to custom object
I have a custom object in which a status field frequently change with approval. Meaning "Approved, Rejected, Assigned, Completed" etc. each time when this status changed , I have to insert a record with all fields from the object to another object called History with new status. So that all the status changes can be reviewed later in the history table.
Can someone suggest the efficient way to get this done.
I am very new to Force.com. and excited to learn
Thanks
George
The best way will be an Apex Trigger for this functionality. It is not that complicated, if you are interested, let me know and I can help you develop one.
You may wite logic as in trigger jus t upbackthis feiled
George
Ok, do you have any development experience at all?
I would definitely recommend reading through the force.com workbook here:
http://wiki.developerforce.com/page/Force.com_workbook
This way you have a basic idea what is going on. Then we can go from there.
I am fairy new , I did something, Not any apex in the application, DId objects, forumalas validations etc. I am actually a relational database guy for 17 yeas. Worked with Oracle PL/SQL.
I read the apex work book, and tried to write the trigger, But did not work . Here is my scenario
I have 2 Objects Change_Request__c which is parent and Change_History__c which is child.
Whenever I change the status value in the parent object and save, It must insert a new recod in the child object with parent id as foreign key.
This should happend for each time the status changed.
Change_Request__c -Parent
Request No
Request_Name__c
Change_Type__c
Description__c
Module__c
Request_Date__c
Status__c ( Possible values "Approved", "Rejected", "Changed")
*********************************************************************************************************
Change_History__c -Child
History_No
Request No ( Forign key from other other object)
Request_Name__c
Change_Type__c
Description__c
Module__c
Request_Date__c
Status_changed_by_c ( user modify the record in the other Object
Status__c ( Changed status in the other obeject)
Something like this should get you started: