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

Rama Chandra D
Kilo Guru

Make sure your workflow is run on your new table rather than 'sc_req_item' and use create task rather than catalog task activity. I can not tell you affirmatively now as I'm responding on the go, but create task allows you to specify table in my opinion.



Darshak


Darshak,


Thanks for helping me out. Maybe I should have been more clear,





If I didn't want to run a workflow, and just created a request from a catalog item on my custom table, the request would create an RITM



I want it to not create an RITM and instead create a Task automatically.



So




Catalog Item Request Submitted
Blaze_Request Created


Blaze_Task Created.



No workflow involved at all


In that case, you can run an after business rule on the Blaze_Request table, to create a new Blaze_Task. Something similar to this.



var blazeTask = new GlideRecord('u_blaze_tasks');


blazeTask.setValue('fieldname',current.fieldname); // mapping from request item to task


.


.


.


blazeTask.insert();


}


I will try this and get back to you.



Thank yo u