Skip to content
  • There are no suggestions because the search field is empty.

Understand Validation Rules and Product Accounting Requirements

Learn how validation rules can require accounting information on Salesforce Products and how those rules can affect Ticketure transaction processing.

Overview

A validation rule checks a record when Salesforce tries to save it. When its formula returns TRUE, Salesforce stops the save and displays the rule's error message. This can affect saves made by users and integrations.

Example:

A Product says what was sold. Its accounting lookup says where the money should be allocated: a General Accounting Unit (GAU) in an NPSP setup, or the applicable Gift Designation in an NPC setup.


For example, a $150 Family Membership needs the appropriate accounting destination on its Salesforce Product for the connector's applicable allocation process. If that lookup is blank, the connector may not create the intended allocation.


When the connector is configured to create missing Products and Price Book Entries, a new Ticketure product may first be created in Salesforce when its first purchase is processed. A validation rule that requires the lookup can stop that Product from being created if the connector cannot populate it. The related transaction may then fail and require correction and retry.


The rule is a guardrail. It does not choose the GAU or Gift Designation, create an allocation, or automatically fix missing setup.

The formula used in training

AND(

ISNEW(),

ISBLANK(Your_Allocation_Lookup__c)

)


Plain wording: “If this is a new Product and the accounting lookup is empty, stop the save.”


Formula part

Meaning

ISNEW()

Is Salesforce creating this record now?

ISBLANK(Your_Allocation_Lookup__c)

Is the accounting lookup empty?

AND(...)

Both conditions must be true to show the error.


Your_Allocation_Lookup__c is a placeholder. Replace it with the actual Product lookup's API name using Insert Field. Do not assume a field name from another org is correct for yours.


Save attempt

What this rule does

New Product, lookup blank

Blocks the save.

New Product, lookup populated

This rule does not block the save. Other checks may still apply.

Existing Product updated, lookup blank

This rule does not block the update because ISNEW() is false.


Scope: This example applies to every new Product, including manually created and integration-created Products. It is not limited to Ticketure Products. It also does not enforce the lookup on existing Products. Review your organization's requirement before adopting it in production.

Demo

  1. Use a sandbox and a test Product.
  2. Go to Setup → Object Manager → Product → Fields & Relationships.
  3. Identify the existing GAU or Gift Designation lookup and its API name. If it is absent, confirm the required accounting setup before proceeding.
  4. Go to Product → Page Layouts and edit the assigned layout.
  5. Add the existing accounting lookup to the Product Information section, if missing. Save and verify the demo user's field access.

Create and test the rule

  1. Go to Setup → Object Manager → Product → Validation Rules → New.
  2. Enter a rule name such as Demo_Product_Allocation_Required.
  3. Add a description: “Training example: require an accounting lookup when creating a Product.”
  4. Enter the training formula, replacing the placeholder with the correct lookup field.
  5. Click Check Syntax.
  6. Enter a clear error message, such as: Select a General Accounting Unit before creating this Product. Use Gift Designation wording for that setup.
  7. Choose Top of Page as the error location and activate the rule for the sandbox test.
  8. Open Products → New, complete the other required fields, leave the lookup blank, and save. Confirm the expected error appears.
  9. Populate the accounting lookup and save again. Confirm the Product saves, assuming other requirements are satisfied.
  10. Deactivate a temporary demo rule after the exercise. Before deploying a permanent rule, test its impact on both manual and connector-created Products.

Troubleshoot a Ticketure transaction blocked by a rule

  1. Open the affected Ticketure Event Queue record and read the full error. Identify the object and rule involved; do not assume all validation failures relate to Products.
  2. Confirm whether the Product already exists and whether its Ticketure identifier matches the purchased product.
  3. Check its accounting lookup. If creation was blocked and no Product exists, prepare the correctly linked Product and required Price Book Entry through your approved setup process. Avoid creating an unlinked duplicate.
  4. Resolve the missing setup or review the rule's scope with your administrator. Do not add a blanket integration-user bypass as a routine fix.
  5. Retry one affected Event Queue item using your established retry procedure.
  6. Verify the resulting transaction and the expected allocation records and amounts. A successful save alone does not prove the allocation was created.
  7. Once the result is confirmed, address other affected items.