Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

API Field Name

Formula

Formula Content

f42_dispo__Calculated_Archive__c

if(
OR(TEXT(f42_dispo__Order_Processing__c) = 'canceled',
AND(
OR(
IF(RecordType.DeveloperName = 'Fixed Publication Date', f42_dispo__Issue__r.f42_dispo__ClosingDate__c < TODAY(),f42_dispo__Issue__r.f42_dispo__PublicationDateUntil__c < TODAY() ),
f42_dispo__Quote__r.sf42_quotefx__SF42_QuoValidThruDate__c < TODAY()
),
f42_dispo__Opportunity__r.IsClosed != true
)
),
true,false)

A Booking is set to archived if:

  • Booking canceled (status of the Booking entry)

  • The publication period is in the past:

    • For Print: f42_dispo__Issue__r.f42_dispo__ClosingDate__c

    • For Digital: f42_dispo__Issue__r.f42_dispo__PublicationDateUntil__c

  • Offer validity expired

  • The opportunity is lostQuote Valid Date is in the past and Opportunity is still open

Archived bookings are no longer counted against availability. However, since rollup summaries cannot be applied to calculation fields, the value of the field f42_dispo__Calculated_Archive__c is written with the help of a simple checkbox using a trigger:

...