Set Mandatory Budget Type or Fund Type

As an administrator, you can manage budgets and funds in two ways, Fixed Budget and Accrual Budget. Create triggers to select budget type or fund type as mandatory while creating or updating a budget or a fund.

To create the trigger to select of the budget or fund type mandatory:

  1. Ensure that you're in an active sandbox.

  2. Navigate to the Application Composer.

  3. Select Sales from the Application list.

  4. Expand Standard Objects > MDF Budgets.

  5. Click Server Scripts.

  6. Navigate to the Triggers tab and click Action > Add to create a trigger.

  7. On the Create Object Trigger page, specify the following two triggers:

    • Trigger: Before Insert in Database

      Trigger Name: MandatoryFundBudgetType_BeforeInsert

      In Trigger Definition, paste the following script from this document and click Save and Close:

      if(__ORACO__BudgetFundType_c == null)
      
      {
      throw new oracle.jbo.ValidationException(adf.util.__ORACO__getMessage('ACO_BUDGET_FUND_TYPE'))
      }
    • Trigger: Before Update in Database

      Trigger Name: MandatoryFundBudgetType_BeforeUpdate

      In Trigger Definition, paste the following script from this document and click Save and Close:

      if(isAttributeChanged('__ORACO__BudgetFundType_c') && __ORACO__BudgetFundType_c == null)
      
      {
      throw new oracle.jbo.ValidationException(adf.util.__ORACO__getMessage('ACO_BUDGET_FUND_TYPE'))
      }
  8. Publish the sandbox to create the required trigger.