You need to sign in to do that
Don't have an account?
sfdc dev 2264
javascript button click help needed
Hi,
I need help on the following req
1) I am having an opportunity record which is getting created automatically from case object
2) I am having another button where i am trying to create a new proposal object record auomatically from opportunity which is master object through a button click on opporunity
I have written a javascript on button click , but its not working
Below is my code
Thanks in Advance
I need help on the following req
1) I am having an opportunity record which is getting created automatically from case object
2) I am having another button where i am trying to create a new proposal object record auomatically from opportunity which is master object through a button click on opporunity
I have written a javascript on button click , but its not working
Below is my code
MY JAVASCRIPT CODE {!REQUIRESCRIPT('/soap/ajax/27.0/connection.js')} var newproposal = new sforce.SObject('Proposal__c'); newproposal.Opportunity__c ='{!Opportunity.Id}'; newproposal.Account__c = '{!Case.AccountId}'; newproposal.Name = '{!Opportunity.Name}'; newproposal.Status__c= 'ENG approved'; newproposal.Proposal_Start_Date__c = new Date(); newproposal.Proposal_End_Date__c = new Date(); newproposal.RecordTypeId='012O0000000DE3V'; var result = sforce.connection.create([newproposal]); if(result[0].success=='true'){ alert('The Proposal record has been Created Successfully.'); window.location = '/' + result[0].id; }Kindly help me on this pls
Thanks in Advance
Your code looks good. Could you please tell me if you are getting any error or is there any required field on the Proposal__c object which you are not specifying here.
Let me know if this helps :)
Thanks!
Amit Singh