Email connector module: Email templace not able to replace system.owner placeholder

0
I am using the latest email connector module in my app with send emails with template. My issue is that in the template, all my placeholders ger replaced except for the changedBy and Owner of the object.   All other attributes of the entity are working fine. Other referenced attributes also get replaced, but any attribute from the system,user and also other instances of system.user like ApplicationUser etc are not being replaced.   Would be great to know if this issue is faced by anyone else or if there is somthing i am missing.  
asked
1 answers
1

In my opinion this is not an issue or bug. 

ChangedBy and Owner are references to the user who did either the last change or created the object. This value is the Object ID of the CurrentUser executing the related action. 

Thus the related data is of type System.User. Data access to this entity is very restricted and thus the reason it doesn't work for you.

 

Also; its a good thing this doesn't work as you expected. User data equals passport data, your social security number. your pincode for your debit card etc. Data you do not want to share with others. User (and account) data should never be used in the business process. its only for authentication and authorisation.

 

If you want to add person data to your proces; add a person (or name it more specific for your case) store the person data fro the process there. add an 1-1 association between person and account entity. Create an account and person together. Account is for personal use to login and authorisation (access rules etc) the person entity is used in the process. And yes, that limits the use of changedby and Owner. 

I prefer to have an association between my person entity and the process details. Like an Order -> Person.

This requires a bit more modeling. though it saves you from security issues, gives you more flexibility etc. 

 

TLDR: replace changedBy and owner by a person entity and related association and some microflow magic.

answered