'ObterTotalDePontos' function does not work inside the Automatic Field
Master Data
•
ID:
Backlog
Published on12/10/2018
•
Last updated on12/22/2022
1 min read
Summary
The function ObterTotalDePontos used inside "Calculated Fields" does not work as expected and gives the following error message: he name 'campoScore' does not exist in the current context
Simulation
-
Access MasterData and create an automatic field
-
Create a simple function that uses ObterTotalDePontos. Ex:
if ( ObterTotalDePontos(campoScore) > 0 ) { return 1; } else { return 0; }
-
Error: The name 'campoScore' does not exist in the current context
Workaround
Depending on the what the account is attempting to do, a solution could be as simple as implementing an external middleware to calculate the fields and handle condition flow alongside MasterData's triggers.