Hello,
In my environment I have the "Customer Self Service Portal", inside this portal there is a "Web Create Case" form. In this form, there is a field for Customer(Account), Contact and another field that I have created called "Services" as an option set. Also, the same Services field exists in the Contact entity. (Each contact can have one service)
For example:
contactid:1
contactname:test
new_services: Office 365
What I am trying to achieve is the following:
I want to populate after page load the service value based on the current filled Contact value from the Contact entity.
I have found something similar to my requirement but it's based on "Account" value not the "Contact". Please have a look below:
<p>{% assign account = entities.account[{{user.parentcustomerid.id}}] %}</p>
<p><span hidden="" id="optionSetValues">{{account.new_countries.value}}</span>
</p>
window.onload = function(){
document.getElementById("new_country").value = document.getElementById("optionSetValues").innerHTML;
document.getElementById("optionSetValues").style.display = "none";
}
Can someone please provide an example using liquid expression to get the current contactid inside the form?
Any help will be greatly appreciated.
Thank you.