/
Validation rule: Check_Inventory

Attention: Confluence is not suitable for the storage of highly confidential data. Please ensure that any data classified as Highly Protected is stored using a more secure platform.
If you have any questions, please refer to the University's data classification guide or contact ict.askcyber@sydney.edu.au

Validation rule: Check_Inventory

Validation rule Details

Name

Check_Inventory

Label

Check_Inventory

Object

AQB__RecognitionOptionOffer__c

Active

Yes

Formula

IF( ISPICKVAL( AQB__RecognitionOption__r.AQB__OKtoOverbook__c, 'Yes' ),
FALSE,
IF( AQB__RecognitionOption__r.AQB__InventoryAvailable__c > 0,
FALSE,
IF( ISPICKVAL( AQB__RecognitionOption__r.AQB__InventoryMethod__c, 'ReducebyAcceptedOnly' ),
IF( ISNULL( AQB__DateAccepted__c ),
FALSE,
IF( AND( NOT( ISNEW() ), NOT( ISNULL( PRIORVALUE( AQB__DateAccepted__c ) ) ) ),
FALSE,
TRUE
)
),
IF( OR( ISNEW(), AND( ISNULL( AQB__DateAccepted__c ), ISNULL( AQB__DateRejected__c ), NOT( ISNULL( AQB__DateOffered__c ) ), ISNULL( PRIORVALUE( AQB__DateOffered__c ) ) ) ),
TRUE,
IF( AND( ISNULL( AQB__DateOffered__c ), NOT( ISNULL( AQB__DateAccepted__c ) ), ISNULL( PRIORVALUE( AQB__DateAccepted__c ) ) ),
TRUE,
IF( AND( OR( NOT( ISNULL( AQB__DateOffered__c ) ), NOT( ISNULL( AQB__DateAccepted__c ) ) ), ISNULL( AQB__DateRejected__c ), NOT( ISNULL( PRIORVALUE( AQB__DateRejected__c ) ) ) ),
TRUE,
IF( AND( NOT( ISNULL( AQB__DateOffered__c ) ), NOT( ISNULL( AQB__DateAccepted__c ) ), ISNULL( PRIORVALUE( AQB__DateOffered__c ) ), ISNULL( PRIORVALUE( AQB__DateAccepted__c ) ) ),
TRUE,
FALSE
)
)
)
)
)
)
)

Error message

Inventory has been exceeded!

Error location

Top of Page

Description

Checks to ensure that inventory is available prior to allowing an Recognition Option Offer to be recorded.

Related content

Validation rule: DonorExpectations
Validation rule: DonorExpectations
More like this
Validation rule: Usyd_Batch_closed_read_only_access_field
Validation rule: Usyd_Batch_closed_read_only_access_field
More like this
Validation rule: USYD_Gift_Club_Status_Validation
Validation rule: USYD_Gift_Club_Status_Validation
More like this
Validation rule: SpendPlan_Handover_Date_Is_Defined
Validation rule: SpendPlan_Handover_Date_Is_Defined
More like this
Validation rule: Consult_OutcomeDesc_Must_Not_Be_Blank
Validation rule: Consult_OutcomeDesc_Must_Not_Be_Blank
More like this
Validation rule: DonorExpectationsSpecification
Validation rule: DonorExpectationsSpecification
More like this