+ Start a Discussion

Autonumber value copied to a custom field

HI all, I have a vf page which is passed information from a number of possible other pages in the url.

From this I can find the name field for the last record I just just created before coming to this page.

I can display that by creating a list in the extension controller and sort it DESC then limit it to 1 record.

Now on my new page I wish to create a second record which when saved. inputs that record number (name) with this new record so it can be retrieved and displayed as part of the new record in its own right.

I cannot copy it striaght RelDoc__c = object.name; as this give error objectfield to string.

I tried copy to integer first but similar error.


Anyone got any ideas?

Is there a way to determine the name value on the first page and pass that to the second as part of the save method. (I have it redirecting there already).


Thanks to all