- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 02:44 AM
Hi,
How can I create a new card using script in an existing visual task board. I tried this script but I had no luck:
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 03:08 AM
Anyway, your scripting is a bit off. The structure itself, though also some reference fields are missing. For example see this:
You've only scripted the lane and task reference.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 03:08 AM
Anyway, your scripting is a bit off. The structure itself, though also some reference fields are missing. For example see this:
You've only scripted the lane and task reference.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 03:18 AM
still don't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 03:20 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 03:14 AM
Very quick working example script:
var vtb = new GlideRecord('vtb_board');
vtb.addQuery('sys_id, 'f11a605983a202102668b0d6feaad3b1');
vtb.query();
if (vtb.next()) {
var card = new GlideRecord('vtb_card');
card.initialize();
card.board = vtb.getUniqueValue();
card.lane = '0a1aa05983a202102668b0d6feaad34c';
card.task = '9db629f783e646102668b0d6feaad3ac';
card.order = '0';
card.insert();
}
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 03:25 AM
@Mark Roethof we tried this and we are not getting any error but the card is still not created