We are using professional edition, we are not having the profile in this PE. We have given the permission set for the specific user using the VF page for creating Account, contact. When i create a new contact it is not getting the particular Account for that contact, we need to pass the accountId to contact. I am tried but still not able to resolve this. Here i have attached the VF for creating new contact.Kindly anyone how to resolve this and also send me any links for this. Thanks in advance.

<apex:page action="{!if(($User.Alias!='ITSor')&&($User.Alias!='BClem'),
    urlFor($Action.Contact.NewContact, $CurrentPage.Parameters.id, [retURL='/003'], true)
     <apex:pageBlock >
        <apex:PageMessage summary="You are not allowed to Create a Contact"
        <apex:pageMessages />

Regards, Lavanya.

  • So your VF page is not able to populate the Contact's parent Account? What code are you using to create the Contact; is it a standard controller function or something custom? If it's custom, can you share the code?
    – Mike Chale
    Jul 1 '13 at 16:33

Use Fire Bug get the Account Text Field ID and use like this

urlFor($Action.Contact.NewContact, $CurrentPage.Parameters.id, 
      [con4_lkid = Contact.AccountId,retURL='/003'], true)

Regards, udaya

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.