Hello, 

I have button to set some data in one field. this field is empty before button click, so it is hidden on record page. after button click when I set data to this field, I want to show this field immediately.

 

How can I reload record page? 

Like 0

Like

4 comments
Best reply

Hello Luka,

 

To solve your business task you need to add visible value to the field and bind it to the method:

"visible": {"bindTo": "visibleMethodName"}
and create an attribute 
"hideFieldAttribute": {
        "dataValueType": Terrasoft.DataValueType.BOOLEAN,
        "value": true
      },

This method will be triggered by a button click and should set an attribute:

buttonAction: function() {
        this.set("hideFieldAttribute", false);
      },

This method is bound to the visible property of the field:

 visibleMethodName: function() {
        var result = this.get("hideFieldAttribute");
        return result;
      },

Please let us know if it helps!

 

Best regards,

Bogdan S.

Hello Luka,

 

Have you tried calling the this.reloadEntity(); method on custom button click? What was the result?

 

Best regards,

Oscar

reloadEntity is for web app. in mobile app, record instance doesn't have reloadEntity :( 

Hello Luka,

 

To solve your business task you need to add visible value to the field and bind it to the method:

"visible": {"bindTo": "visibleMethodName"}
and create an attribute 
"hideFieldAttribute": {
        "dataValueType": Terrasoft.DataValueType.BOOLEAN,
        "value": true
      },

This method will be triggered by a button click and should set an attribute:

buttonAction: function() {
        this.set("hideFieldAttribute", false);
      },

This method is bound to the visible property of the field:

 visibleMethodName: function() {
        var result = this.get("hideFieldAttribute");
        return result;
      },

Please let us know if it helps!

 

Best regards,

Bogdan S.

I resolved it, using business rule. Thanks a lot, you gave me good point.

record.changeProperty("UsrGeneralAgreementUrl", {
    hidden: false
});

 

Show all comments