How to create a Custom button to create a new record in other object?
I tried by using javascript code to create a new record i am getting:
Unexpected token error
my code is
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
var curnc= new sforce.Sobject(TR_Currency_Approval__c);
curnc.currency={!TR_Currency__c.CurrencyIsoCode};
curnc.Active__c={!TR_Currency__c.Active__c};
curnc.Description__c={!TR_Currency__c.Description__c};
result=sforce.connection.create.([curnc]);
if(result[0].success == 'true'){
alert('An New Currency Approval with Name - ' + curnc.currency + ' was Created Successfully.');
}
is there any other way to achieve this