How to add/update UserSessionShapes in User Management Subsystem programmatically
Hi,
How to add UserSessionShapes in User Management Subsystem programmatically.
I'm using the below code to update it
// table: INFOTABLE dataShape: ""
let data = Subsystems["UserManagementSubsystem"].GetConfigurationTable({
tableName: "UserSessionShapes" /* STRING */
});
// Provide your filter using the format as described in the help topic "Query Parameter for Query Services"
let query = {
"filters": {
"type": "And",
"filters": [{
"fieldName": "name",
"type": "EQ",
"value": "MYSHAPE"
}]
}
};
let params = {
t: data /* INFOTABLE */ ,
query: query /* QUERY */
};
// result: INFOTABLE
let sessionData = Resources["InfoTableFunctions"].Query(params);
if (sessionData.length === 0) {
data.AddRow({
"name": "MYSHAPE"
});
Subsystems["UserManagementSubsystem"].SetConfigurationTableRows({
values: data /* INFOTABLE */,
persistent: true /* BOOLEAN {"defaultValue":true} */,
tableName: "UserSessionShapes" /* STRING */
});
}
var result = data;
When I execute the code I'm getting this error
UserSessionShapes does not have a primary key field assigned - See Script Error Log for more details.
The above script works with the normal thing configuration Table.
Please help me with this. Thanks in advance.
/VR

