Announcement

Collapse
No announcement yet.

Dynamic Handler - how to set value for wyswig field when status changed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamic Handler - how to set value for wyswig field when status changed

    Hi,
    How to dynamic set vaule on wyswig field when I change status to 'Canceled' in edit view?
    I try that but it doesn't work:
    PHP Code:
    define('custom:quote-dynamic-handler', ['dynamic-handler'], function (Dep) {

    return 
    Dep.extend({

    init: function () {
    this.controlFields();

    this.recordView.listenTo(
    this.model'change:status'this.controlFields.bind(this)
    );
    },

    controlFields: function () {
    if (
    this.model.get('status') === 'Canceled') {


    this.model.set('mywyswigfieldname','Lorem ipsum Lorem ipsum');
    this.model.save();
    this.model.fetch();
    }
    },
    });
    }); 
    Thanks for any help!
    Lukas
    Last edited by LuckyLouie; 07-19-2021, 11:15 AM.
Working...
X