[midPoint] Velocity Mail template
Davy Priem
davy.priem at vives.be
Wed Oct 22 18:05:43 CEST 2025
Dag Ronny,
We do this like this in the velocity code:
#set( $user = $event.requesteeObject )
#set( $activatiecode = ${basic.getExtensionPropertyValue($user, 'initiele_activatiecode')})
#parse('/opt/midpoint/var/templates/pers.vm’)
You may also contact me on Teams if you want to see how we do stuff at VIVES. ;)
Best regards
Davy Priem
Hogeschool VIVES
Op 22 okt 2025, om 17:15 heeft Ronny Heymans via midPoint <midpoint at lists.evolveum.com> het volgende geschreven:
Dear Miss, Sir,
we have user object with a schema extension.
How can we access the extension property In the mail template (velocity code) ?
For instance if I add $event.extension I can see all my extension properties
PCV(null):[PP({http://example.com/userType}Field1):[PPV(String:value1)], PP({http://example.com/userType}Field2):[PPV(String:value2)]
But if I want to use one of the properties I can't access them.
I tried the following:
$event.extension.Field1
$event.extension["Field1"]
$event.extension[0]
$event.extension.get("http://example.com/userType").Field1
$event.extension.get("http://example.com/userType")["Field1"]
$event.extension.get("http://example.com/userType")[0]
With $event.extension.getAny() I get a list with the fields but the values are empty.
Thanks for the help.
Kind regards
Ronny Heymans
_______________________________________________
midPoint mailing list
midPoint at lists.evolveum.com<mailto:midPoint at lists.evolveum.com>
https://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20251022/7f2db0ea/attachment-0001.htm>
More information about the midPoint
mailing list