Last active
December 19, 2024 12:22
-
-
Save AshikaSuresh/1464c13425a125c0f162264dd98fdb8b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| At Zylker, the admin felt ensuring data integrity during key Deal stages is crucial. To prevent accidental loss of information, deleting items from the subform is restricted when a deal is in the following stages: Proposal/Price Quote, Negotiation/Review, Closed Won, Closed Lost, or Closed Lost to Competition. | |
| Row Delete Prevention : beforeRowDelete subform Event by returning false after verifying Deal Stage. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Detail Page - Subform Items beforeRowDelete | |
| const restricted_Stages = ["Proposal/Price Quote","Negotiation/Review","Closed Won","Closed Lost","Closed Lost to Competition"]; | |
| let stage = ZDK.Page.getField('Stage').getValue(); | |
| if (restricted_Stages.includes(stage)) { | |
| ZDK.Client.showAlert("Order deletion is not allowed once the deal reaches the "+stage+" stage.","Can't delete!","Got it!"); | |
| return false; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment