• james12344321
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hi,

 

  I have a basic new sobject as an example called essay__c with one field called name__c.

 

I'd like to have a custom button on the accounts tab that when pressed creates a new essay record. I'm trying thew following code in the button but it doesn't work:

 

{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")}

var t1= new sforce.SObject("essay__c "); t1.name__c = "jim";

var result = sforce.connection.create([t1]);

 

It's probably something really stupid. Does anyone know why please?

 

Thanks,

James.

Hi,

 

  I have a basic new sobject as an example called essay__c with one field called name__c.

 

I'd like to have a custom button on the accounts tab that when pressed creates a new essay record. I'm trying thew following code in the button but it doesn't work:

 

{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")}

var t1= new sforce.SObject("essay__c "); t1.name__c = "jim";

var result = sforce.connection.create([t1]);

 

It's probably something really stupid. Does anyone know why please?

 

Thanks,

James.