Email template - getGUID

1
Hello again dear community, Is it possible to get the entity GUID in my email template (as a placeholder). I can’t figure it out. It’s possible with a new custom attribute on my entity but with that I’ll struggle with my deeplinks & Page URLs. Thank you in advance!   Update: For now I use a custom attribute filling it in by getting the GUID through a microflow. In my email template I take that custom attribute and it works. Not perfect I think but ...
asked
6 answers
2

Yes, you can accomplish this:
1- Create GUID from the object when you create it and store it in Product ID
2- You need to create a deeplink by selecting a string argument, which will be your ProductID and it will be a parameter in your deeplink microflow.
3- Create a Email token entity and add a 'Link' attribute and generate your link and store it inside the Link and use replace token JA before sending the Email.
4- inside your email template replace the token variable after doing module reflection to the Email Token entity:

answered
1

Hi Mike,

Inside the community common module, there is a getGUID java action, I think it will become handy in your case if you want to get the GUID of the object to send it in your URL, https://marketplace.mendix.com/link/component/170 

answered
1

In addition to Nour’s answers, if you need access to the built in Mendix GUID, you could also expose and use this.

To do this you can modify your entity to add a new attribute of type Integer/Long. Add an After Create microflow to the entity, and in that use the getGUID action from community commons, passing in the parameter object you have in the microflow. This should return the GUID of the entity. You then Change Object to set the new attribute with this value. Do not commit the value in this microflow.

Hope this helps.

 

answered
1

Many thanks on both of you!
At this moment like Nour said I store the GUID in a new attribute when creating the object. Works perfect! With that I can play around in my email templates. Great!!!!

But if I may still bother you… I created a microflow with two params (strings). Somehow it won’t enter my microflow. So I setup an easy one. But still I won’t enter my microflow. Do you know why? Normally everything is configured well…
In my screenshots the easy example.

 

 

Again, thanks!!

answered
1

Yes it does not display inside the configuration of the deeplink, while the attribute does exist inside the DeepLink entity, so you can add it manually inside Deeplink_Details snippet and then use it by checking it.

answered
0

Oh is it allowed to change things in the core modules? I first copied the snippet to my module but then it complains about the entity.


Beside that, it works thanks to your help. My screenshot is the config that works for me. I had to include the params again strange enough.
One thing left. It only works in private browser while I entered allowed roles … You know why? Sorry for all my questions. I’m learning … 

 

answered