...
The central field in the Ad Position Placement option is the formula field Availability- f42_dispo__countAvailable__c
API Field Name | Fomula | Formula Content |
---|---|---|
f42_dispo__countAvailable__c | if( f42_dispo__Publication__r.f42_dispo__isDigital__c = TRUE, | Physical limit of an availability:
|
Note |
---|
The posted / reserved / blocked bookings are entered using rollup summaries for the Ad Position Placement object.
|
...
Also here a formula field is in the center:
API Field Name | Formula | Formula Content |
---|---|---|
f42_dispo__Calculated_Archive__c | if( |
FixedPublicationDate', f42_dispo__Issue__r.f42_dispo__ClosingDate__c < TODAY(),f42_dispo__Issue__r.f42_dispo__PublicationDateUntil__c < TODAY() ), | A Booking is set to archived if:
|
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:
...
Writes the value of the field f42_dispo__Calculated_Archive__c into the checkbox field
f42_dispo__archivesarchive__c.Updates associated Blocked Position entries.
Updates the document dispatch belonging to a Booking (no voucher copy is created for cancelled Booking), for f42_dispo__MVX_ProofOfDeliveryRule__c, Record Type Based on Dispo Books.
...
Blocked Positions f42_dispo__DispoBlockedItems__c are also marked as archived using a calculation field:
API Field Name | Formula | Formula Content |
---|---|---|
f42_dispo__Calculated_Archive__c
| f42_dispo__DispoBookEntry__r.f42_dispo__Calculated_Archive__c | The field f42_dispo__Calculated_Archive__c in the Blocked Position uses a formula to transfer the value from the triggering Booking entry. |
The DispoBlockedItems.trigger writes the value of the calculation field into the checkbox field f42_dispo__archive__c at the Blocked Position.
...