enable button (save) aftersave

Hello Community! 

I need make enabled the save button after save based on a field condition.

Is that posible?

Regards,

Like 0

Like

5 comments

Hi Federico, could you please clarify what do you mean by "after save on a field condition"? What is the business task you want to solve? 

Dennis Trieskunov,

In the save: function() in js o onsave: i need after run the base logic function keep the button save in the edit page visible.

Dear Federico,

If you open BasePageV2 schema you will find there onSaved() function. At the last line of this method you can see:

this.set("IsChanged", this.isChanged());

So now you know where and how modification property is set.

You need to override onSaved() as you wish. For example:

methods: {

            onSaved: function() {

                this.callParent(arguments);

                this.set("IsChanged", true); // always show Save button after saving

            }

        },

Peter Vdovukhin,

hi,

Can you please clarify on opportunity section if any one filled details by using opportunity mini page after filling the details if you click on save i need to go directly to edit page of opportunity.

praveen n,

You need to override the basic save method, so to firstly run parent realization and save the record. Afterwards, use other basic functionality to open current record card. You can use the following code snippet:

save: function() {
				this.callParent(arguments);
				var elementUId = this.get("ProcessElementId");
				if (elementUId) {
					Terrasoft.ProcessModuleUtilities.tryShowProcessCard.call(this, {
						procElUId: elementUId,
						recordId: this.get("Id")
					});
				} else {
					NetworkUtilities.openEntityPage(this.getOpenEntityPageConfig());
				}
			}

Regards,

Anastasia

Show all comments