You need to sign in to do that
Don't have an account?
Mazlow Cohen 12
Execute javascript from a Hyperlink Formula field?
Can you help me with this? I am trying to put the following javascript. I want to update a field on a custom object, by clicking a hyperlink text field, that I willl put in a report. So the users can update the field without leaving the report. I want the hyperlink to execute the following or someway to update the record. I have a custom buttom on the layout, but I can't put a custom button in a report. Only fields. Thanks!
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
var ProcTask = new sforce.SObject("FSTR__Process_Task__c");
ProcTask.Id = '{!FSTR__Process_Task__c.Id}';
ProcTask.FSTR__Status__c = 'Completed';
var result = sforce.connection.update([ProcTask]);
location.reload(true);
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
var ProcTask = new sforce.SObject("FSTR__Process_Task__c");
ProcTask.Id = '{!FSTR__Process_Task__c.Id}';
ProcTask.FSTR__Status__c = 'Completed';
var result = sforce.connection.update([ProcTask]);
location.reload(true);
Shashank (Salesforce Developers)
Please see if this helps: http://salesforce.stackexchange.com/questions/70712/utilising-javascript-in-hyperlink-function-of-a-formula-field