1

I have a custom button on Contact page layout. When a user clicks on the button, it takes the user to Change record type page and sends some other parameters in the URL. They select the new user type and are redirected to the Contact record in Edit mode.

The URL looks like

/setup/ui/recordtypeselect.jsp?id={!Contact.Id}&con4={!Contact.Current_Employer__c}&CF00Ni0000001a5jC={!User.FirstName}+{!User.LastName}&CF00Ni0000001a5jC_lkid={!$User.Id}&retURL={!Contact.Id}

where &con4 is the ID for Account field. I am sending the value of Current_Employer__c on Contact to Accountfield.

The value is being copied to Account field, however once the user clicks save. On save I want the Contact to be linked to the account with name in Current_Employer__c.

However, it retains the previous account record.

If they click on the lookup button on Account, while still in edit mode and select Account, they are able to link to different account.

1

enter image description hereYou have the answer right in your URL as you have CF00Ni0000001a5jC_lkid and CF00Ni0000001a5jC one for the userid and one for username, you need to do the same for con4 just populates the name but your con4 param is missing the ID.

try con4_lkid = {!Contact.Current_Employer__c} (If current_Employer__C is a lookup it will pick it as ID, if not provide current_employer__c.id).

con4={!Contact.Current_Employer__c}&con4_lkid ={!Contact.Current_Employer__c}&
CF00Ni0000001a5jC={!User.FirstName}+{!User.LastName}&CF00Ni0000001a5jC_lkid={!$User.Id}
| improve this answer | |
  • Unfortunately Current_Employer__c is not a lookup field. It is a text field. Is it possible to clear the previous AccountID form Account field. So that once the click save it look's up using account name now residing in Account field? – Yash Mehta Jun 27 '13 at 17:41
  • 1
    The issue is more similar to giving ur name and not ur boardpass when checking in, the system needs both name and ID. In this context name is ur name, ID is the con4_lkid value. The con4_lkid needs to be provided with the current_employers__C object's ID on save with the name of the object. – Rao Jun 27 '13 at 17:45

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.