Product: Post to General Ledger
Description: Instructions on how to apply logic based on the Record Type for an Opportunity in Post to General Ledger when Salesforce is the source of a formula.
Environment: All
Version: All


When using Salesforce as a source on a Post to General Ledger formula, a client may have a need to apply logic based on the Opportunity Record Type.

By default, Salesforce exposes the record type on the Opportunity object with a Record Type ID field.  This field is available in mapping within Post to General Ledger.

The field contains the ID, as stored on the Opportunity, for the record type.  

In order to use this value and understand which type of Opportunity record is being used, you must look in Salesforce to get the translation for this Record Type ID.  In order to perform the translation, you should navigate to Setup --> Object Manager and choose the Opportunity object.  Once on the Opportunity object, choose Record Types.

To find the corresponding Record Type ID for each of the Record Types available in your Salesforce, click on the name of the record type in the list that you need the ID for.  The URL for the page for the record type will contain the ID for the record type.  Below is the URL when choosing the Donation record type from the record type list above.

Once you have the ID for the Record Type needed, then field logic can be applied like any other field from Salesforce.  For example, if I wanted to make a decision on a field if my Record Type ID is the one for the Donation record type, then I could apply logic such as what is below.

When I review the output, you can see the Record Type ID in one column and the derived logic from the next column and the logic used above.