+ Start a Discussion

pass custom field value from apex controller to standard case page

Hello ,


I have a apex controller in which have a url for exmple

String url = '/500/e?nooverride=1&ent=Case&RecordType=' + recordTypeIdList[0].id


In which I just to pass a value of field for example 'Order Name' which is custom field in Case layout.

How Can I do it

But I dont want to use the field ID of the Order Name as it wont work in other enviorment .



Mayank Jain


Then, you I think you won't be able to do it.


I face the same issue some time ago. 

I finally had to use a 'Custom Label' on the button, and change the value of the 'Custom Label' on every sandbox / environment I use. 


(I know is not a pretty solution, but as far as I know, there is no way to retrieve the field ID from code)


I asked something similar some time ago, and there was no way to do it. The post is right here