Hello,
I'm new to Verint development and I'm struggling with the VM syntax. Our customer needs Group search results to contain information about the Group's creator/owner. I'm trying to do this with $core_v2_user.Get() per this documentation:
Here's what I've tried, but when I run this it crashes, most likely due to a syntax error:
#if ($searchResult.ContentType == "group") #set ($ownerId = $searchResult.Content.CreatedByUserId) #set ($owner = $core_v2_user.Get("%{Id=$ownerId}") <li class="content-item mphise-search-result-item" data-contenturl="$core_v2_encoding.HtmlAttributeEncode($searchResult.Url)" #if($hasMore) data-hasmore="true" #end> <div class="mphise-search-result-avatar $searchResult.ContentType"> #if($searchResult.Content.AvatarUrl) <img class="search-result__avatar" style="width:40px; height: 40px;" src="$core_v2_encoding.HtmlAttributeEncode($searchResult.Content.AvatarUrl)" border="0px" alt="$resultTitle" /> #end </div> <div class="mphise-search-result-details"> <a class="search-result-title" href="$core_v2_encoding.HtmlAttributeEncode($searchResult.Url)">$resultTitle</a> <p class="search-result-description">$searchResult.Body</p> </div> </li> #end
How do I use the $core_v2_user.Get() in a .vm file? What's wrong with my syntax above? I've confirmed that the $ownerId variable resolves to a legitimate value.
Thank you,
Chris