How to check in delivery form if the save button which is used to save delivery is enabled or not using if tag ? | Community
Skip to main content
April 8, 2022
Solved

How to check in delivery form if the save button which is used to save delivery is enabled or not using if tag ?

  • April 8, 2022
  • 1 reply
  • 1876 views

In delivery form I want to check whether save button is enabled or disabled on button click. I want to achieve this in if tag(<if expr="?"></if>), so which expr should I can use to check this ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kapil_Sharma_

Hi user07978,


I don't think we have the ability to check if the "SAVE" button is enable or not in the delivery. But you can try to compare the "mDATA" attribute of the Delivery Schema for that particular delivery, if there are any changes before and after, it means that some changes were made to the delivery.

 

1 reply

isahore
Community Advisor
Community Advisor
April 8, 2022

Hi @user07978,

If possible, can you elaborate on your use case? Why do you need to validate this in the delivery?

 

In general, the save button will be disabled until something changes in the delivery when you open it for editing. The save button is enabled once something in the delivery changes. For instance, even if you select the same option from a drop down in the delivery form, e.g. the routing account, then also the save button gets enabled since that lead to a fresh change (although the same value).

 

Thanks.

user07978Author
April 10, 2022

I have added one custom button in delivery. In that button click I want to check whether something in delivery is changed or not. if changed I want to add functionality written on save button for this custom button. Also I wanted like if edited field's value is same as previous it should not be considered as change and display popup on save button click that "Nothing is changed".

user07978Author
April 11, 2022

Hi user07978,


I don't think we have the ability to check if the "SAVE" button is enable or not in the delivery. But you can try to compare the "mDATA" attribute of the Delivery Schema for that particular delivery, if there are any changes before and after, it means that some changes were made to the delivery.

 


Hi @kapil_sharma_ ,

 

Can you please elaborate more. Like how I can use 'mData' to check changes in delivery? how can I access mData attribute of delivery in delivery form. Which xpath I can use for it?

 

Thanks