You need to sign in to do that
Don't have an account?
DTAPADMIN
Task is not being created
My code seem to execute and the success message is displayed on the screen but the task is not being created. Please look at the code below and give any input as to why this might not create the new task.
Code:
var queryResult = sforce.connection.query("Select CreatedDate, Project_Manger__c, Name, Implementation_Rep__r.Name, Implementation_Rep__c, Id, Go_Live_Planned_Date__c, Technology_Rep__r.Name, Technology_Rep__c From SFDC_Projects__c WHERE Name = '{!SFDC_Projects__c.Name}'"); var records = queryResult.getArray('records'); var myTask1 = new sforce.SObject("Task"); myTask1.WhatId = records[0].Id; myTask1.OwnerId = records[0].Technology_Rep__r.Name; myTask1.Status = 'Not Started'; myTask1.Priority = 'Normal'; myTask1.Subject = 'Create Customer DB from Base'; myTask1.IsReminderSet = true; sforce.connection.create([myTask1], callback); }
soo.....
Once you get the javascript date you can use the standard javascript methods to
adjust the date. You can find example here:
http://www.w3schools.com/js/js_obj_date.asp
HTHs,