You need to sign in to do that
Don't have an account?
ashish855
create task on click of custom button error
I receive following error on click of a custom button
missing;before statement
the custom button is created for creating a task automatically using the foll Javascript code:
{!REQUIRESCRIPT("("/soap/ajax/17.0/connection.js")} var t1= new sforce.SObject("Task"); t1.Assigned To = "r1free@fantailtech.com"; t1.Subject = "ABC283"; t1.Name = "abcd"; t1.Status = "Not Started"; t1.Priority = "Normal";result = sforce.connection.create([t1]);
Anand Singh
The code should look like this:
{!REQUIRESCRIPT("("/soap/ajax/17.0/connection.js" )}
var t1= new sforce.SObject("Task" );
t1.OwnerId = "SFDC ID of User with email r1free@fantailtech.com "; //instead of using label "Assigned To", use field API name called "OwnerId"
t1.Subject = "ABC283";
t1.Name = "abcd";
t1.Status = "Not Started";
t1.Priority = "Normal";
result = sforce.connection.create([t1]);
Hope this resolves the issue.