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

Modified on Fri, 30 Aug at 3:00 PM

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)]



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.



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article