Dynamic activity

KouassiP
Tera Contributor

Hello All , 

I have created a dynamic activity to copy a file from a RITM . My Task has order 1 .

After many attempts , i have noticed that the file failed to copy from the RITM to the task .

I have tried to run the script in the background script and i managed to get the TaskID , however in the Dynamic activity i can't collect the taskID and it's seems that the field is empty .

I read somewhere that , the Dynamic activity run before the cmdb has the updade ended .

If it's the reason , could you please help me to fix this issue ?

 

var grTask = new GlideRecord ('sc_task');

grTask.addQuery('request_item', ritmSysId);

grTask.query();

 

if (grTask.next())

{

  Tache = 'Tache Trouvée';

  gs.info('Tache : ' + Tache);

  taskSysID = grTask.getUniqueValue();    // sys_id de la tâche

  gs.info('taskSysID : ' + taskSysID);

}

else

{

    Tache = 'Tache Non Trouvée';

    gs.info('Tache : ' + Tache);

0 REPLIES 0