want to auto click the link when a field update happens picklist value is "sent to customer".

I have a link from website that when i click on link it will change status on website.

what i want is ,Want to auto click that link when a slaesforce field upadte happenes pick list value is"sent to customer".

auto click should run on back ground it should not reload page.

Help me suggesting some ideas .say me this is possible or not


var c = new sforce.SObject("service_request__c"); 
c.id = "{!Service_Request__c.Id}"; 
c.status__c = "sent to customer";
var today = new Date(); 
var dd = today.getDate(); 
var mm = today.getMonth()+1; //January is 0! 
var yyyy = today.getFullYear(); 
if(dd<10) { 
if(mm<10) { 
today =yyyy+'-'+mm+'-'+ dd;  
var a="{!Service_Request__c.Nicomatic_request_Id__c}".replace(",","");

result = sforce.connection.update([c]);


I dont want to use open this url i want to click on this url ( i mean to execute this url ) without opening on new window browser


If it is a custom visualforce page, you can use jQuery/javascript to do this. Call a javascript method onchange of picklist value and pass the picklist element ($this). Then in the javascript/jQuery method you can just check whether it is match the value and trigger a click on the link.

if(element.value == 'Your value'){
  • no it is not a custom visualforce page
    – Teja
    Apr 24 '15 at 5:59
  • Then I am afraid you might have to hardcode page element Id and run this script using some sidebar component. It is ugly solution, but will work
    – Victor
    Apr 24 '15 at 6:03

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.