Is it possible to change an server attribute using the custom action option in a widget? Thanks for help
Asked
Active
Viewed 389 times
1 Answers
1
let attributeService = widgetContext.$injector.get(widgetContext.servicesMap.get('attributeService'));
let attributes = [{
"key": YOUR_ATTRIBUTE_KEY,
"value": YOUR_ATTRIBUTE_VALUE
}];
attributeService.saveEntityAttributes(entityId, 'SERVER_SCOPE', attributes).
subscribe(
() => {
console.log('Saved!');
},
error => {
console.log('Error');
}
);

devaskim
- 492
- 3
- 10