Interface IContractPriceRecordManager


public interface IContractPriceRecordManager
The ContractPriceRecordManager API is exposed to formula groovy elements in an approved Contract calculation. The API can be accessed via the 'priceRecords' Groovy binding during 'contractRecalculation' calculation context.
  • Method Summary

    Modifier and Type
    Method
    Description
    ContractPriceRecord
    addOrUpdate(String priceRecordName, Map<?,?>... attributeValues)
    Adds a new Contract Price Record (CPR) to the current Contract Line Item or updates an existing one with the specified name and optional initial generic attribute values.
    ContractPriceRecord
    addOrUpdate(Map<?,?>... attributeValues)
    Adds a new Contract Price Record (CPR) to the current Contract Line Item or updates an existing one with the default name and optional initial generic attribute values.
    boolean
    delete(String priceRecordName)
    Removes the Contract Price Record (CPR) with the specified name linked to the current Contract Line Item.
  • Method Details

    • addOrUpdate

      ContractPriceRecord addOrUpdate(Map<?,?>... attributeValues)
      Adds a new Contract Price Record (CPR) to the current Contract Line Item or updates an existing one with the default name and optional initial generic attribute values.

      Example:

      
       if (api.getCalculationContext() == 'contractRecalculation') {
           priceRecords.addOrUpdate(['attribute1': 'attributeValue'])
       }
       
      Parameters:
      attributeValues - A map of attribute names (e.g. attribute1) and its values.
      Returns:
      Updated Contract Price Record object.
    • addOrUpdate

      ContractPriceRecord addOrUpdate(String priceRecordName, Map<?,?>... attributeValues)
      Adds a new Contract Price Record (CPR) to the current Contract Line Item or updates an existing one with the specified name and optional initial generic attribute values.

      Example:

      
       if (api.getCalculationContext() == 'contractRecalculation') {
           priceRecords.addOrUpdate('GeneratedContractPriceRecord',['attribute1': 'attributeValue'])
       }
       
      Parameters:
      priceRecordName - A new name of the Contract Price Record you want to create, or the name of the existing CPR you want to update.
      attributeValues - A map of attribute names (e.g. attribute1) and its values.
      Returns:
      Updated Contract Price Record object.
    • delete

      boolean delete(String priceRecordName)
      Removes the Contract Price Record (CPR) with the specified name linked to the current Contract Line Item.

      Example:

      
       if (api.getCalculationContext() == 'contractRecalculation') {
           priceRecords.delete('GeneratedContractPriceRecord')
       }
       
      Parameters:
      priceRecordName - The name of the Contract Price Record you want to delete.
      Returns:
      true if the price record is successfully deleted