You need to sign in to do that
Don't have an account?
prazon
a problem with the onclick javascript for this button or link was encountered
I am working on a sandbox of unlimited edition and here is following code, still getting the error:
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
var connection = sforce.connection;
alert('connection: '+connection);
var contractId = "{!Deal_Description__c.Contract__c}";
alert(contractId);
var con = new sforce.SObject("Contract");
con.Id = contractId;
con.Deal_Description__c = "{!Deal_Description__c.Key_Information__c}";
alert(con);
connection.update([con]);
alert("Copied To Contract.");
Hi
Try this
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
var DealDescription= new sforce.SObject("Deal_Description__c");
var connection = sforce.connection;
alert('connection: '+connection);
var contractId = connection.DealDescription.get(Contract__c);
alert(contractId);
var con = new sforce.SObject("Contract");
con.Id = contractId;
con.Deal_Description__c = connection.DealDescription.get(Key_Information__c);
alert(con);
connection.update([con]);
alert("Copied To Contract.");
Did this post solve your problem if so please mark it solved so that others can get benifited
Thanks
asish
Thanks for the help but the contract Id wis coming undefined :(
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
var DealDescription= new sforce.SObject("Deal_Description__c");
var connection = sforce.connection;
alert('connection: '+connection);
var contractId = DealDescription.Contract__c;
alert(contractId);
var con = new sforce.SObject("Contract");
con.Id = contractId;
con.Deal_Description__c = DealDescription.Key_Information__c;
alert(con);
connection.update([con]);
alert("Copied To Contract.");
Hi
please make sure you have written this line ..
var connection = sforce.connection;
var contractId = connection.DealDescription.get(Contract__c);
alert(contractId);
Did this post solve your problem if so please mark it solved so that others can get benifited
Thanks
asish
same error :( ...contract Id is coming undefined!!!
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
var connection = sforce.connection;
alert('connection: '+connection);
var contractId = connection.DealDescription.get(Contract__c);
alert(contractId);
var con = new sforce.SObject("Contract");
con.Id = contractId;
con.Deal_Description__c = DealDescription.Key_Information__c;
alert(con);
connection.update([con]);
alert("Copied To Contract.");
Hi
Try this
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
var DealDescription= new sforce.SObject("Deal_Description__c");
var connection = sforce.connection;
alert('connection: '+connection);
var contractId = connection.DealDescription.Contract__c;
alert(contractId);
var con = new sforce.SObject("Contract");
con.Id = contractId;
con.Deal_Description__c = DealDescription.Key_Information__c;
alert(con);
connection.update([con]);
alert("Copied To Contract.");
Thanks
asish
Error coming:
Cannot read property 'Contract__c' undefined