What should I do if I encounter an 'ExpressionCompilerException: The compilation of an expression has failed' error in Mail & Deploy?

What should I do if I encounter an 'ExpressionCompilerException: The compilation of an expression has failed' error in Mail & Deploy?

FIRST CREATED ON 1 Feb 2024  I  AUTHOR Emma Camacho

If you encounter an 'ExpressionCompilerException: The compilation of an expression has failed' error in Mail & Deploy, it indicates a problem with processing your expressions. Here’s a quick guide to help you troubleshoot and resolve this issue:


Issue:



STACK TRACE
ExpressionCompilerException: The compilation of an expression has failed.
at MailAndDeploy.Server.Compilers.ExpressionCompiler.EvaluateExpression(Expression pExpression, Boolean pPerformSyntaxValidation, String pModulesCode, ExpressionParameterValue[] pParameters)
at MailAndDeploy.Server.Persistency.Entities.SendEMailAction.ExecuteAction()
at MailAndDeploy.Server.Persistency.Entities.Action.Execute()
at MailAndDeploy.Server.Persistency.Entities.Task.Execute(IEnumerable`1 pParameterValues)
Exception: 'Text Text' is not declared. It may be inaccessible due to its protection level.
End of statement expected.



Resolution


Whenever you see the plus and expand icons in the Web interface after a text box or

the icon with three dots in the Designer

 it means that Mail & Deploy is expecting an expression in this text box.


Examples of valid expressions:

"This is a text"

"Sales report - " & Date.Today.ToString("dd.MM.yyyy")

2024

[Datasource].[Executive Dashboard].[Expression].[sum(Sales)]

"Sum of sales: "  & [Datasource].[Executive Dashboard].[Expression].[sum(Sales)]




Info

Looking for Additional Guidance?


If you require more detailed information or further assistance, please visit our comprehensive Online Documentation. Our resources are designed to help you navigate all features and functionalities effectively.