NowAssistSkillConfig rejects hyphens in name (TS210), and the generated sys_one_extend_capability inherits that restriction
#95
Unanswered
dalestubblefield
asked this question in
Help and Questions with SDK or Fluent
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
NowAssistSkillConfigvalidatesnameagainst/^[a-zA-Z0-9 ]+$/and rejects hyphens, underscores, and punctuation. The generatedsys_one_extend_capabilityrecord then copies the skillnameverbatim, so the restriction propagates to the capability record's name.I would like to understand whether the letters/numbers/spaces rule reflects a platform constraint or is an SDK-side guard, and whether hyphens could be allowed.
Environment:
@servicenow/sdk4.8.1, Australia Patch 2 Hotfix 2.Repro
npm run build:Replacing the hyphens with spaces builds clean.
Where it comes from
In
@servicenow/sdk-api/dist/external-plugins/nask.js:validateName()enforcesconst regex = /^[a-zA-Z0-9 ]+$/, and is called for the skillname, prompt names, and attribute names.name: $.from("name"), sosys_one_extend_capability.nameis the skillnameunchanged.SKILL_NAME_MAX_LENGTHis 40.Why it matters
The capability
nameis the only stable, human-readable handle a scoped app has for resolving a skill at runtime, for example viaGlideRecord('sys_one_extend_capability')onname. Resolving by name is attractive because it keeps sys_ids out of source and out of per-instance configuration.That makes the naming rule more consequential than a display-name style preference:
now-sdk explain nowassist-skills-guidedoes not mention it. It surfaces only at build time.Questions
/^[a-zA-Z0-9 ]+$/enforced by the platform onsys_one_extend_capability.nameandsn_nowassist_skill_config, or is it an SDK-side guard that could be relaxed to permit-and_?internalNameon the capability would address this cleanly.Happy to supply a minimal reproduction repo if useful.
Beta Was this translation helpful? Give feedback.
All reactions