Add dynamic attributes to a record
Store dynamic attributes and their values on a record.
Before you begin
Role required: admin
Procedure
- Navigate to the table that holds your dynamic attribute store field.
- Create a new record by selecting New.
- In the dynamic schema reference field you created, select the group, groups, category, or categories that contain the attributes that you want to store on the record.
- Call setValue() in the GlideRecord API and send data to the dynamic attribute store field.
Setting a value in the voltage attribute in a Product table record
var gr = new GlideRecord(‘products’);
gr.setValue(‘groups_json->global_electronics_group->voltage’, 40);
gr.insert();
In the example, the schema was defined a dynamic schema with a category of groups_json, a group of global_electronics_group and an attribute of voltage. A typical example may be category = Television, group = dimensions, attribute = screen size.