Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

Does now-sdk capture changes into the application's selected update set?

MuhammedHaS
Tera Contributor

I'm using the ServiceNow SDK to build and deploy apps. I expected the tables and columns I create this way to be recorded in the application's selected update set, but after deploying nothing appears in it at all.

I want to confirm whether this is the intended behaviour, or whether I'm doing something wrong. There is a lot of mixed information about this and I could not find a clear answer in the official documentation. Some people I talked to say changes go into the selected update set automatically but my test shows they do not.

Details below on a simple test.

 

Environment

  • ServiceNow SDK (Fluent)
  • PDI, australia
  • Scoped application, created with now-sdk init

 

What I did

Defined a table in Fluent, then built and installed it:

import { Table, StringColumn, ChoiceColumn, DateTimeColumn, ReferenceColumn } from '@servicenow/sdk/core'

export const x_n_ustest_ticket = Table({
    name: 'x_n_ustest_ticket',
    label: 'US Test Ticket',
    display: 'title',
    schema: {
        title:    StringColumn({ label: 'Title', maxLength: 200, mandatory: true }),
        detail:   StringColumn({ label: 'Detail', maxLength: 4000 }),
        owner:    ReferenceColumn({ label: 'Owner', referenceTable: 'sys_user' }),
        due_date: DateTimeColumn({ label: 'Due Date' }),
        status:   ChoiceColumn({
            label: 'Status',
            dropdown: 'dropdown_without_none',
            default: 'open',
            choices: {
                open:   { label: 'Open', sequence: 100 },
                closed: { label: 'Closed', sequence: 200 },
            },
        }),
    },
})
now-sdk build
now-sdk install

I expected the table and its columns to land in the selected update set. The table and columns were created correctly on the instance, but nothing landed in the update set — it stayed empty. I also tried a second time, adding another table to the same app but its the same result.

 

Questions

  1. Is now-sdk install supposed to capture into the application's Default update set? If so, what am I missing?
  2. If not, is there a way to get the new records recorded in the selected update set of the instance?
0 REPLIES 0