You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a custom field to an object like Account which contains a numeric, e.g. 'Period_01'
Using the Formula Builder screen component, create a formula to be evaluated which looks at that custom field, e.g.
IF ($Account.Period_01__c > 1, 123, 456)
Test the output from the Formula Builder in the 'Evaluate Formula' invocable action
Invocable action will fail with an error
Expected behaviour
Period_01__c should be recognised as a valid field on the object.
Actual behaviour
Error message in the Flow indicates the numerics in the field name are not handled, flow will crash with an error like:
An Apex error occurred: System.QueryException: No such column 'Period_' on entity 'Account'
Looking at the source code on GitHub, I believe the REGEX pattern matcher for field names is too restrictive, and only considers
A-z , periods (.) and underscores (_) as valid characters in a field name.
This should be enhanced so that numbers are also valid in the context of a field name
Steps to reproduce
Steps to reproduce the behavior:
IF ($Account.Period_01__c > 1, 123, 456)
Expected behaviour
Period_01__c should be recognised as a valid field on the object.
Actual behaviour
Error message in the Flow indicates the numerics in the field name are not handled, flow will crash with an error like:
An Apex error occurred: System.QueryException: No such column 'Period_' on entity 'Account'
Looking at the source code on GitHub, I believe the REGEX pattern matcher for field names is too restrictive, and only considers
A-z , periods (.) and underscores (_) as valid characters in a field name.
This should be enhanced so that numbers are also valid in the context of a field name
i.e. Current pattern:
Pattern mPattern = pattern.compile('(?<!")[$!{]{1,2}[A-z_.]*[}]{0,}');
Perhaps should be:
Pattern mPattern = Pattern.compile('(?<!")[$!{]{1,2}[A-Za-z0-9_.]+(__c)?');
The text was updated successfully, but these errors were encountered: