Created
October 20, 2015 19:45
-
-
Save jechlin/6347df8da08c4c3478b9 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
| def purchaseAmount = getFieldByName("Purchase Amount") | |
| def relationshipField = getFieldByName("Relationship Type") | |
| def gsm = getFieldByName("GSM") | |
| def isStrategic = relationshipField.getValue().toString() == "Strategic" | |
| def moreThanTenK = purchaseAmount.getValue() as Long | |
| if (isStrategic || moreThanTenK) { | |
| gsm.setRequired(true).setHidden(false) | |
| } | |
| else { | |
| gsm.setRequired(false).setHidden(true) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment