Solved

Notification messages and substitution variables not working

  • 17 November 2021
  • 6 replies
  • 213 views

Userlevel 3
Badge +6

In FSM6u10, I have created a notification message for Projects. For the most part the notification forms correctly, however some fields do not seem to pull in a value.

The values below do not populate where other fields from the Project table do. 

 

project.user_def1

project.user_def2

project.created_by 

 

Below is an extract from the message, but have added a column on the right with the table.field used.

 

SCA_ID

154

project.project_id

 Place_ID

ZZ PLACE ONE

project.place_id

Description

test

project.project_title

SCA_Status

OPEN

project.proj_status

SCA_Approval_Status

REJECTED

project.approval_status

Activity

  project.user_def1

SCA_Start_Date

26 November 2021 00:25

project.user_def_dttm1

SCA_End_Date

26 November 2021 01:50

project.user_def_dttm2

Permitted_Access

  project.user_def2

Created_By

  project.created_by

SCA_Owner

APAVLOU

project.person_id_owner
icon

Best answer by Shneor Cheshin 18 November 2021, 00:32

View original

6 replies

Userlevel 3
Badge +6

Can anyone shed any light as to why it behaves this way?

 

Thank you,

Angelo

Userlevel 3
Badge +6

Can I please add, I have noticed that in another notification message the project.user_def1 field is also included and works correctly.. 

 

This really is baffling as even if I take out all the message content and only include: {{project.user_def1}} in this notification if does not pull in the filed value into the notification…

 

Why does it work in one and not the other???

Userlevel 6
Badge +26

@AngeloPav

Seems like you are doing it correctly.

At this point I can suggest that you will delete the configurations and recreate them from scratch again.

Also, try adding the filed(s) to the custom metadata, if you haven’t done so.

Cheers!

Userlevel 3
Badge +6

Hi Shneor and anyone else that may be able to help, 

 

The send of the notification described above, “kind of” worked.. My colleague added the custom metadata as suggested and the notifciation populated correctly. however, when I try it the notification does not populated correctly resulting in same missing fields. :persevere:

 

What is really frustrating is that I then logged on with the Studio account and tested the notificacation it still did not work for me.. When my colleague logs on with the same STUDIO account it does work..

This is the case even after numerous (full cache) refreshes and even a complete uninstall and re-install of the Smart Client.

 

Any ideas why would experience this behaviour.. It is consistently working for him and consistently not working for me. This is regardless of whether we both use the same STUDIO account or our own individual ADMIN accounts.

I am very confused.. 

Userlevel 6
Badge +26

Hi @AngeloPav 

I am not 100% following you.

If you have an account ID of ‘XYZ’, and you login from 2 different machines, than it works from one and not the other?

Have I got this correctly?

Cheers!

Userlevel 3
Badge +9

Hi @Shneor,

 

I work with Angelo and have just done some more testing on this.  Here are my findings.

  1. If you change the Approval Status on the Project directly on the field on the Project screen.  The Notification goes out correctly with all values.
  1. 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>

  1. This update is then captured via a second Business Rulke that send out the Notification (the same rukle that send out the notificaiton in step 1 above) However, now, the values User_def1,user_def2 a d created_by are left blank!
  2. If i run the 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>APAVLOU</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>MFOWLER</modified_by>
    <modified_dttm>2021-11-23T11:22:22.4473891</modified_dttm>
  </project>
</update_project_result>

  1. 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.  
  2. 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.

 

Reply