- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2019 02:19 AM
Hi
I am trying to open a catalog item and set values using a server side script specifically.
catalog name: Onboarding
fields:Country,type of project,type of facility
Thanks
Ijaazops
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2019 07:43 AM
You do it this way.
var cart = new Cart();
var item = cart.addItem("<sys_id>"); // sys_id of your catalog item
cart.setVariable(item, '<variable>', '<value>'); // Add your variables this way
cart.placeOrder();
you can also assign the outputs variable to cart.placeOrder();
like
outputs.record_id=cart.placeOrder();
to get the request number to open it up later in subsequent steps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2019 07:43 AM
You do it this way.
var cart = new Cart();
var item = cart.addItem("<sys_id>"); // sys_id of your catalog item
cart.setVariable(item, '<variable>', '<value>'); // Add your variables this way
cart.placeOrder();
you can also assign the outputs variable to cart.placeOrder();
like
outputs.record_id=cart.placeOrder();
to get the request number to open it up later in subsequent steps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2019 09:52 PM
Hi Nitesh,
Thank you for the solution.
Could you tell me how can i open the created request in another step, like record query step in ATF.
Thanks
Ijaazops

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2019 11:09 AM
ATF has something called output and input variables.
So in the serverside script for example when you write outputs.record_id=cart.placeOrder();
outputs.record_id will automatically be available to use in the subsequent steps, you can either do record query, or open an existing record or stuff like that.
The way you use it like in the screenshot, you click that big black dot and pick the output variable from the previous step.