You need to sign in to do that
Don't have an account?
vamsi varma
How can we skip Record Type Selection Page while creating new contact
I have four types of account record types and i have three types of contact record types.
while creating a new contact the record type selection page must be skipped and the record type for contact must be based on account record type.
How this can be possible any suggestions ?
I have a logic to get contact record type id based on account record type id.
Can anyone help to solve this issue using visualforce page.
Thanks in advance
Vamsi
Please add following parameter to the URL of Contact creation page -
RecordTypeId=RecordTypeIdWhichYouWantToSet
for e.g. Your url will look like -
https://ips007-dev-ed.my.salesforce.com/003/e?RecordTypeId=RecordTypeIdWhichYouWantToSet
Thanks and Regards,
Ishwar
Please mark this as best answer if it solves your problem.
ID rtId = ContactRecordTypeId;
PageReference p = new PageReference('/003/e?RecordType='+rtId);
p.setRedirect(true);
return p;
But this is good in sandbox , we cannot hardcode recordtype id and i have three types of record ids , i cannot go on edit them for each and every action right.
And id changes in production so this is not the right way.
Is there any other way which suits my problem exactly using visual force.
Thanks ,
Vamsi Varma
Also, while over riding remember to check the checkbox to skip the record type selection page.
Let me know if that helped.
vineetkumar,
i have done that , but when creating new contact from contacts tab, we will not have any default account id , so when we select account in vf page , the page should refresh and work as in previous case i.e.new contact from account page layout.
in the first case i am creating new contact from account page layout and i am able get expected results(contact record type id).please see below image.
in the second case when i am trying to create new contact from contacts tab we dont have account name here , so when we select account name in the field the vf page should refresh and contact record type should be automatically populated.
can anyone help me in this issue , its very urgent.
Thanks in advance,
Vamsi Varma.
.
Can you share your code here?