SAP Knowledge Base Article - Public

3724839 - Error: Invalid syntax for business expression when updating datetime field using determination

Symptom

Error message: "Invalid syntax for business expression. Operands P1DT0H0M0S incompatible" is displayed when attempting to update a DateTime field using determination.

Environment

SAP Sales Cloud and SAP Service Cloud Version 2

Reproducing the Issue

  1. Navigate to Extensibility Administration.
  2. Open any Service.
  3. Go to Determinations.
  4. Create a determination.
  5. Fill all required fields.
  6. Add an assignment: {extensions/Z_XYZ} = ( {adminData/updatedOn} + P1DT0H0M0S ) (Z_XYZ represents an extension field (DateTime field) within the service).
  7. Error message "Invalid syntax for business expression. Operands P1DT0H0M0S incompatible." is raised.

Cause

The duration within the assignment block has not been maintained within quotes.

Resolution

  1. Update the assignment syntax to include quotes around the duration.
  2. Use the following format for the assignment: {extensions/Z_XYZ} = ( {adminData/updatedOn} + 'P1DT0H0M0S' )

See Also

KBA 3476824 - How to Use Determinations to Perform Addition and Subtraction Operations on Date Time Fields

Keywords

invalid syntax, business expression, datetime field, determination, extensibility, sales cloud, service cloud, P1DT0H0M0S, assignment block, error message, calculated field, duration, quotes , KBA , CEC-CRM-CZM-CUL , Custom Logic for for SAP Sales/Service Cloud , How To

Product

SAP Sales Cloud and SAP Service Cloud Version 2 1.0