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

Help with design!!

I have an object which has certain set of records with some fields. Now the user uploads a set of records using excel with certain changes to the fields of the existing record. I want to show one by one all the records to which changes were made, with the old and the new values infront of one another. Allowing the user to confirm the changes and only then commit to the actual database. I am planning to hold the uploaded data in another object and update the original object only on  click of approve on the comparison page.


Thanks in advance.


lets say the actual object is objectA and the object you will create to hold changes is objectB. 

1) when ever the user wants to update he should be using the objectB and not objectA.

2) so now you have all the changes in the objectB. create a custom checkbox field in objectB say 'Commit'.

3) create a VF page that will show the differences between objectA and objectB and the commit field at each record level.

4) the user can check the changes and select the commit checkbox on the VF page and then submit.

5) in the controller of VF page you can do the logic to update the objectA records.


let me know if you see any difficulties.


Thanks... If there are multiple records which have some differences wrt the original record... I want to show the original record in read only mode.... and infront of the original the temporary record with editable but prepopulated fields from the excel which was uploaded. My problem is if there are a large number of records which have differences how should I allow the user to check each one one at a time.


Please let me know if I am not making myself clear...


you will have to design your vf page in this way


recordid1   field1oldvalue(readonly)    field1newvalue(ediatble)    f2oldval    f2newval ..... commit(checkbox)

recordid2   field1oldvalue(readonly)    field1newvalue(ediatble)    f2oldval    f2newval ..... commit(checkbox)

recordid3   field1oldvalue(readonly)    field1newvalue(ediatble)    f2oldval    f2newval ..... commit(checkbox)

recordid4   field1oldvalue(readonly)    field1newvalue(ediatble)    f2oldval    f2newval ..... commit(checkbox)



let me know if you have any problem with this


Actually the expectation is this way:

                                                                                        Record One

                               Original (REad Only)                              |                                                  New(Editable)

          Field1                                                                             |                                 Field1

          Field2                                                                             |                                 Field2

          Field3                                                                             |                                 Field3


                                                                                   Update                                                                     NEXT RECORD


I am thinkin how would I be handling the next record thing on click of which I should move to the next record and do the same thing.


Hope i am clear... :smileysurprised:


in the apex class for the vf page take a totalCount variable and set it to the total no.of records. and take another variable Counter. increment the counter when the user clicks on next and decrement it when user clicks on previous. you can compare the counter variable and totalCount variable to decide whether to show the next (or previous)link on the page.


Thanks a lot for the heads up... I ll start doing some POC on the same..