Created
June 26, 2014 08:49
-
-
Save smcllns/cca19a4e3f978dee6b35 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
/* | |
Above is how you comment-out code | |
AND(For_Special_Order__c = TRUE, ISCHANGED(PBSI__Sales_Order_Line__c ), OR(PBSI__Sales_Order__r.Sales_Order_Status__c <> "CANCELLED"),PBSI__Sales_Order__r.Sales_Order_Status__c <> "RESERVED") | |
Below is how you end a comment | |
*/ | |
/* I wanted to write you an example but keep yours here for comparison. Delete all comments when done. */ | |
/* | |
What I think you're trying to accomplish - correct if wrong: | |
- if special order item | |
- and if either status is changed to cancelled | |
- or if quantity is changed | |
- but not if sales order is tenative or previously cancelled | |
*/ | |
AND(For_Special_Order__c = TRUE, | |
OR( | |
ISCHANGED( PBSI__Total_Unit_Qty_Needed__c ), | |
AND( | |
ISPICKVAL( PBSI__Sales_Order__r.PBSI__Status__c, "Cancelled" ), | |
ISPICKVAL( PRIORVALUE(PBSI__Sales_Order__r.PBSI__Status__c), "Cancelled" ) | |
) | |
), | |
NOT( | |
OR(ISPICKVAL( PBSI__Sales_Order__r.PBSI__Status__c, "Tentative" ),ISPICKVAL( PRIORVALUE(PBSI__Sales_Order__r.PBSI__Status__c), "Cancelled" ) | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment