0

Is it possible to change an server attribute using the custom action option in a widget? Thanks for help

enter image description here

1 Answers1

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