darrenhillconsulting
01/29/2025, 2:08 PMCeligo AI
01/29/2025, 2:08 PMAI generated answer (using internal Slack threads):To join the ScheduledScriptInstance table to the scheduledScriptDeployment (or the scheduledScript) using SuiteQL, you would need to use the TaskID field. The TaskID field in the ScheduledScriptInstance table corresponds to the ID of the script deployment in the scheduledScriptDeployment table. Here is an example of how you might do this:
sql
SELECT
ScheduledScriptInstance.StartDate,
ScheduledScriptInstance.EndDate,
ScheduledScriptInstance.TimeStampCreated,
ScheduledScriptInstance.MapReduceStage,
ScheduledScriptInstance.Status,
ScheduledScriptInstance.TaskID,
scheduledScriptDeployment.ScriptName
FROM
ScheduledScriptInstance
JOIN
scheduledScriptDeployment
ON
ScheduledScriptInstance.TaskID = scheduledScriptDeployment.ID
This will give you a result set that includes the start date, end date, timestamp created, map reduce stage, status, task ID from the ScheduledScriptInstance table, and the script name from the scheduledScriptDeployment table.
******
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
01/29/2025, 2:08 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.829047799
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.822845221
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.819690704
Celigo AI
01/29/2025, 2:08 PMCeligo AI
01/29/2025, 2:09 PMdarrenhillconsulting
01/29/2025, 2:09 PMEmanuel V
03/09/2025, 6:40 AMvar mapReduceSearch = search.create({
type: search.Type.SCHEDULED_SCRIPT_INSTANCE,
filters: [
['script.internalid', 'is', scriptId],
'AND',
['status', 'anyof', ['PROCESSING', 'PENDING']]
],
columns: ['status']
});