How does a custom request table create a task on a custom task table

Blaze2
Kilo Guru

First time creating a table where a request will come from and a subsequent task.

Normally it is just the table for the application I am creating for, so please forgive me for my ignorance.

Here is the scenario.

I created two tables

u_blaze_requests

u_blaze_tasks

I have numbered them BR and BT respectively.

How would I get a Request created from "BR" to create an "BT".
I am playing around in my personal instance and for the life of me can't understand the logic.

All I am able to accomplish is creating the BR and then it creates an RITM.

Any Help Would Be Appreciated

1 ACCEPTED SOLUTION

Blaze2
Kilo Guru

I ended up killing the table then recreating it by extending the Service Management Table.



This gave me all of the functionality that I needed.


View solution in original post

26 REPLIES 26

Just to add here, you need to initialize() your GlideRecord to insert new data in Blaze_Task table.


Please find more info here: GlideRecord - ServiceNow Wiki


Well, It is my understanding that, using initialize() would help in cases where there onLoad scripts that set few essential default parameters, but if I have no initialization parameters, would   I still need it?



Darshak


Hi Darshak,



Can you please explain more. As per my understanding we need to use initialize to have an empty record created to populate data before insert. I thought we might need this since there would be some value to pass on when new task gets created. Let me know your thoughts.


My understanding is that initialize, does a similar thing when you click 'New'(item with sys_id -1). It creates a form with fields that are set to be pre-populated (like priority or category, which ever parameters setup as default for a new form). However, when you don't do the initialize, glide record object of the desired type is instantiated   with the object attributes but as empty.



Darshak


Thanks guys,



Unfortunately, not working.



SO thinking of going another route, How can I get my custom Table's name in the workflow versions



Workflow Editor > Check Out WorkFlow > Properties > General > Table


find_real_file.png