You need to sign in to do that
Don't have an account?
Ben Merton 17
Using a text formula from Custom Metadata in Apex
Is it possible to create a text field in Custom Metadata which contains a formula that can then be used in Apex.
I am trying to build a simple tax engine that would refer to metadata fields. A metadata record would look like this:
Name: Sales_Tax
Input Variables: Basic_Price, Sales_Tax_Rate
Output Variable: Sales_Tax_Amount
Formula: Sales_Tax_Amount = Basic_Price*Sales_Tax_Rate
Then I would call this into an Apex trigger that updates a field with the Sales_Tax_Amount
I am trying to build a simple tax engine that would refer to metadata fields. A metadata record would look like this:
Name: Sales_Tax
Input Variables: Basic_Price, Sales_Tax_Rate
Output Variable: Sales_Tax_Amount
Formula: Sales_Tax_Amount = Basic_Price*Sales_Tax_Rate
Then I would call this into an Apex trigger that updates a field with the Sales_Tax_Amount
Is there NOTHING I can do to achieve this result? For example, using the Tooling / Metadata API to parse out the text field??
You mean that this can't be done even if I build a competely external system that is able to achieve this? Let's say I want to invest USD 1 billion dollars into finding a solution to this problem? Even then, it can't be done??
If you can't answer properly, please don't answer at all as it just means that the question gets deprioritised