function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JodieBJodieB 

Custom button logging people out...

Hi Everyone,

 

We're using custom address fields in Contacts and Accounts.  I've got a button to drag the address from the account through to contact page (which can then be edited).  This button called "Create Contact"  is on the account page (in contact related list) and used when users are creating a new contact for the account.  The trouble is while it works fine for me/system admin it keeps logging users out of Salesforce and then they can't get back in - their passwords are then not recognised.  Here is the button: 

 

https://cs2.salesforce.com/003/e?{!Contact.Contact_Address_Line_1__c}&00NR0000000WQS7={!Account.Address_Line_1__c}&00NR0000000WQJj&{!Contact.Contact_Address_Line_2__c}&00NR0000000WQT0={!Account.Address_Line_2__c}&00NR0000000WQJt&{!Contact.Contact_Address_Line_3__c}&00NR0000000WQT5={!Account.Address_Line_3__c}& 00NR0000000WQJu&{!Contact.Contact_Postal_City__c}&00NR0000000WQTF={!Account.Postal_City__c}&00NR0000000WQJp&{!Contact.Contact_Postal_State__c}&00NR0000000WQT6={!Account.Postal_State_Province__c}&00NR0000000WQJy&{!Contact.Contact_Postal_Zip_Code__c}&00NR0000000WQTP={!Account.Postal_ZIP_Code__c}&00NR0000000WQK3&{!Contact.Contact_Postal_Country__c}&00NR0000000WYcz={!Account.Postal_Country__c}&00NR0000000WYmP&{!Contact.Contact_Region__c}&00NR0000000WYnm={!Account.Region_1__c}&{!Contact.Phone}&con10={!Account.Phone}&acc10&{!Contact.Fax}&con11
={!Account.Fax}&acc11

 

I'm fairly new to this and have scanned through old posts and tried some of the suggestions but its nothing is working.  Does anyone know how to resolve this?

 

Thanks

 

Jodie

 

Best Answer chosen by Admin (Salesforce Developers) 
shillyershillyer

Remove https://cs2.salesforce.com

 

Have the URL start with: /003/e?...

 

Hope that helps,

Sati

All Answers

shillyershillyer

Remove https://cs2.salesforce.com

 

Have the URL start with: /003/e?...

 

Hope that helps,

Sati

This was selected as the best answer
JodieBJodieB

Hi Sati

 

Thank you very much for your help - that worked!

 

Have a good weekend

 

Jodie

MarinaMartinMarinaMartin

Trying to solve this problem myself tonight, thought I'd leave a crumb for anyone else following this search result path.

 

The above solution works and should be implemented, if that's your problem. If that doesn't fix it, though, check your "retURL" in the button URL. When a user clicks save or cancel, they're brought back to the page specified by retURL -- a blank retURL means they get a Salesforce login screen. I'd remove this retURL part entirely if you don't know how to set it correctly.

 

e.g.

/00T/e?who_id={!Contact.Id}&tsk4={!TODAY}&retURL=%2F <-- this goes nowhere

change to

/00T/e?who_id={!Contact.Id}&tsk4={!TODAY}