You need to sign in to do that
Don't have an account?
Simon Baird
URL No longer exists on Custom OnClick Javascript button
Hi all,
I am trying to add some text to a field by pulling it from its parent record using a Onclick Javascipt button. Getting the URL no longer exists on refresh. Note the button is a custom button called from a VF page use apex:commandbutton
I am trying to add some text to a field by pulling it from its parent record using a Onclick Javascipt button. Getting the URL no longer exists on refresh. Note the button is a custom button called from a VF page use apex:commandbutton
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")} var c = new sforce.SObject("Patient_Session__c"); c.id ="{!Patient_Session__c.Id}"; var pgn = "{!Patient__c.Patient_Progress_Note__c}"; c.Treatment_Notes__c = pgn; sforce.connection.update([c]); window.location= '/{!Patient_Session__c.Id}';
doravmon
you should use: window.location= '/' + {!Patient_Session__c.Id};