As was pointed out by Colin, you want to use the "display name". In general, when working with in product scripts you want to use the "display name" for object references. The only one that current does not support that is artifact type. But we will fix that shortly.
------------------------------
Ben Lurie
------------------------------
Original Message:
Sent: Tue January 07, 2020 10:01 AM
From: Adina Bodkins
Subject: Assign Workspace via In-product Script
Hey,
We're trying to assign workspaces via in product scripts but when trying the following code it threw the error: "The value NameObjectHandle: null/workspace_api_name is not valid for the field workspace"
incident.workspace = "workspace_api_name"
When I change it to the workspace ID it doesn't throw an error however it requires an API call to know which ID matches to which name.
Is there a way via the in-product scripts I can assign a workspace via it's name and not id?
Thanks,
------------------------------
Adina Bodkins
------------------------------