Started anbother thread as the previous one was marked as solved.
We have an issue whereby sometimes substitution variables work, and sometimes not. The patterns and findings are as follows:
We have a notification setup to fire upon project.approval_status being updated. The fields that do not reliably work in the resulting notification messages are:
- project.user_def1
- project.user_def2
- project.created_by
Here are my the findings from testing
- If you change the Approval Status on the Project by directly changing the field on the Project screen. The Notification goes out correctly with all values.
- However, In our application, the Project Approval status is typlically changed via a business rule triggered from TASK. The XML for this rule output looks like this
<update_project>
<project>
<project_id>@project_id</project_id>
<proj_status>OPEN</proj_status>
<approval_status>SUBMITTED</approval_status>
<update />
</project>
</update_project>
- This update is then captured via a second Business Rule that send out the Notification (the same rule that send out the notificaiton in step 1 above) However, now, the values User_def1,user_def2 a d created_by are left blank!
- If i run the output XML from the first rule in the XML Poster, i get this result
<update_project_result>
<project>
<project_id>154</project_id>
<project_title>test</project_title>
<person_id_owner>ADMIN</person_id_owner>
<status>OP</status>
<proj_status>OPEN</proj_status>
<reopened>N</reopened>
<place_id>ZZ PLACE ONE</place_id>
<place_id_to_bill>ZZ PLACE ONE</place_id_to_bill>
<approval_status>SUBMITTED</approval_status>
<days_open>1</days_open>
<address_id>3459</address_id>
<currency>GBP</currency>
<important>N</important>
<corporate_currency>GBP</corporate_currency>
<user_def_dttm1>2021-11-26T00:25:00.0000000</user_def_dttm1>
<user_def_dttm2>2021-11-26T01:50:00.0000000</user_def_dttm2>
<modified_by>ADMIN</modified_by>
<modified_dttm>2021-11-23T11:22:22.4473891</modified_dttm>
</project>
</update_project_result>
- NOTE here, the values that are then missing from the notification message are not shown in the XML result! I think this may be the root of the issue.
- So, the question at this stage is why are those fields not shown in the result above? I have checked the Custom Meta data for the Project table and they are defined just like the user_def_dttm1 & 2 that are in the result.