reza.seedin
04/13/2026, 1:48 AMCeligo AI
04/13/2026, 1:49 AMAI generated answer (using internal Slack threads):Based on the conversations, it seems like you are trying to set the start and end dates for a project task using a User Event (UE) script, but it's not allowing you to update and there's no error being thrown. One possible reason could be that the project task record is not yet fully created when the UE script is trying to update it. This can happen if the project tasks are created by a scheduled script, as mentioned in the first conversation. In this case, the UE script might be trying to update the record before it's fully created, which could cause the update to fail without throwing an error. Another possible reason could be related to how you're setting the date values. As mentioned in the second conversation, when setting date fields in SuiteScript, you should use a Date object with
setValue or a string with setText. If you're using a string, you can use N/format to convert a Date into a string.
Lastly, as mentioned in the third conversation, some fields might not be scriptable, meaning they can't be updated through SuiteScript. However, this is less likely to be the issue in your case, as the start and end dates for a project task should be scriptable.
Here's a sample code snippet based on the information from the conversations:
javascript
var taskRecord = nlapiLoadRecord('projecttask', taskId, {recordmode: 'dynamic'});
taskRecord.setFieldValue('startdate', new Date());
taskRecord.setFieldValue('enddate', new Date());
nlapiSubmitRecord(taskRecord, true);
Please replace taskId with the actual ID of the project task you want to update.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
04/13/2026, 1:49 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.826293945
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825012207
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.814331055
Celigo AI
04/13/2026, 1:49 AM