Symptom
When attempting to save custom template that contains "SAP" in the name, Razor validation is blocking it.
Environment
SAP Sales Cloud CPQ
Reproducing the Issue
- Using @Url.MTContent in the Responsive Design template, try to load a file that contains "SAP" word in the name.
Cause
The word "SAP" is not forbidden, but it is a part of the forbidden razor namespaces and it cannot be used in the templates along with the “@“ sign or in “if“ statement.
Resolution
- Avoid using capital letters when using "SAP" word
- Change code to avoid "SAP" being used along "@" or in "if":
- Example:
@{
string mtContent = @Url.MTContent("additionalfiles/");
mtContent = mtContent + /SAP.pdf";
<a id = "<id>" data-bind="href="@mtContent" target="_blank" ><span class="sap-icon" >Test</span></a>
}
- Example:
- Break the line after @Url.MTContent("additionalfiles/"), and add a "+" sign to add the path.
See Also
Keywords
Razor Validation, Razor, Responsive template, Customization, CPQ , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , Bug Filed
Product
SAP CPQ 2023