You need to sign in to do that
Don't have an account?
hitz
How to override Custom object URL ???
Hi,
I am is having one custome object Created in my application. and i have Created Tab of that object...
Now i have created one visual force page i want to redirect to that same object. code is below
<apex:outputLink value="{!URLFOR('/a08/o')}">Dispute</apex:outputLink>
code works good but when installed package into another production org it will give me insufficent Previliges Error. because it is changes object tab id ('/a08/o') to ('003/o') ..
i want to make url fix .... is it possible ????????
What to do in This case ??
Help me and Reply me ASPS.
hi to all i got solution
using Describe Call method
Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe();
Schema.SObjectType disObj = gd.get(<ObjectName>);
return 'https://'+ApexPages.currentPage().getHeaders().get('host')+'/'+dObj.getDescribe().getKeyPrefix();
All Answers
As you must have realized that as you install your code in another org your object id will also change, hence you need to may be modify your login a bit. May be you can have a setting custom object and in that have 2 fields:-
1. Object name
2. Id
In you code you can query this object extract the necessary id and store it in a variable say ObjId
and modify your code, so that in reads as :-
<apex:outputLink value="{!URLFOR('/'+ {!oBjID} +'/o')}">Dispute</apex:outputLink>
HI hitz,
Why don't you try the following code
I think will solve your problem.
HI Ispita_Navatar
Thank you for your reply I think for all object i need set the id..
hi to all i got solution
using Describe Call method
Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe();
Schema.SObjectType disObj = gd.get(<ObjectName>);
return 'https://'+ApexPages.currentPage().getHeaders().get('host')+'/'+dObj.getDescribe().getKeyPrefix();