and more in a single search tool across platforms. Read the announcement here. |
12/19/2023 12:32 AM
Hi Team,
WE are implementing a disconnected application.
We have created dynamic attributes and are storing it in the customproperty of the account. We have an dynamic attribute - DocCode. The value of this is 'ABC' during creation of the account
On modify/account we are updating the dynamic attribute (e.g. DocCode) stored in customproperty1 to 'DEF'
I have configured email template to be sent on update account but I want to display - customproperty1 of account i.e. the old value of the DocCode - 'ABC'
I tried using $ {accounts?.customproperty11} - which is not working
During creation when I want to display the accountname & doccode I am using below :
Accountname - $ {task?.accountName}
Doccode - $ {task?.requestAccessKey?.collect{it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('DocCode')}.collect{it.attributeValue}}.get(0).join(', ')}
On update account but I want to display - customproperty1 of account i.e. the old value of the DocCode - 'ABC' . Can someone guide me how this can be achieved
Solved! Go to Solution.
12/19/2023 01:16 AM
Hi @necoutinho ,
You can create another dynamic attribute, which would be visible only on modify account form, keep it read-only, and map it to account's customproperty1. This attribute would show always old value present in CP1 of the account, use this newly created read only dynamic attribute in your email template which you want to send on update account using the below expression
{task?.requestAccessKey?.collect{it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('DocCodeReadOnly')}.collect{it.attributeValue}}.get(0).join(', ')}
Replace bold part with your new dynamic attribute name.
12/19/2023 01:51 AM - edited 12/19/2023 01:58 AM
Can't we simply pass the customproperty of the account in the email template?
These are the options I have tried
${task?.acccount.customproperty11} - not working
${accounts?.customproperty11} - not working
${accounts.customproperty11} - not working
${account_customproperty11} - not working
${account.customproperty11} - not working
12/19/2023 09:23 AM
@necoutinho : User below logic to get oldvalue of dynamic attribute
$ {task?.requestAccessKey?.collect{it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('DocCode')}.collect{it.attributeoldValue}}.get(0).join(', ')}
12/21/2023 03:43 AM
This worked, thanks
12/19/2023 06:56 PM - edited 12/21/2023 05:28 AM
Current value : ${task?.requestAccessKey?.collect{it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('DocCode')}.collect{it.attributeValue}}.get(0).join(', ')}
Old Value :
${task?.requestAccessKey?.collect{it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('DocCode')}.collect{it.attributeoldValue}}.get(0).join(', ')}
12/19/2023 11:11 PM - edited 12/19/2023 11:12 PM
This is not working. The old value is coming as blank.
12/20/2023 10:51 AM
@necoutinho : Have you tried the suggestion I provided?
12/20/2023 10:55 AM
new value :
${accessItems.collect{it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('DocCode')} .collect{it.attributeName.toString() + ': ' + it.attributeValue}.join('###')}.toString().replaceAll('\\[','').replaceAll('\\]','').replaceAll('\\,','')}
Old value
${accessItems.collect{it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('DocCode')} .collect{it.attributeName.toString() + ': ' + it.attributeoldValue}.join('###')}.toString().replaceAll('\\[','').replaceAll('\\]','').replaceAll('\\,','')}