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
OlbrestOlbrest 

Ovveride button and parent object Id.

Hello, Sirs.

I have two custom objects: Object1, Object2.
Object 2 is related to Object1 and have lookup field to Object1.

I have overrode standart "New" button for Object2 to my custom visualforce page.

Object1 have folowing id: "a0E80000001TJxF".

In the detal page of Object1 (https://na6.salesforce.com/a0E80000001TJxF) When I clicked 'New' button I getting the following link:

https://c.na6.visual.force.com/apex/allocations?CF00N800000033Hc8=Wine+for+Oleg&CF00N800000033Hc8_lkid=a0E80000001TJxF&scontrolCaching=1&retURL=%2Fa0E80000001TJxF&sfdc.override=1

I should parse the 'a0E80000001TJxF'.

If I had url like 'https://c.na6.visual.force.com/apex/allocations?id=a0E80000001TJxF'. It's would not a problem for me to parse it.

But unfortunate I get field 'CF00N800000033Hc8_lkid' which I can't expecting.

I need a code which should parse this Id or 'CF00N800000033Hc8_lkid' field.
Message Edited by Olbrest on 04-07-2009 07:12 PM