Deeplink is not working as expected through script
Content
Hi Team,
I want to create a hyperlink for SR number and store it into a field which will be navigate to particular record.For that I have used standard deep link functionality but it is not working as expected. Please refer the screen and let me know how to achieve this.
Thanks,
Shaheela
Version
21ACode Snippet
//Script
def account = "VGP Properties"
def srno = SrNumber
def ServiceRequestVO = newView('ServiceRequestVO')
def vc = ServiceRequestVO.createViewCriteria()
def vcrRow = vc.createRow()
def vcFilter1 = vcrRow.ensureCriteriaItem('AccountPartyUniqueName')
vcFilter1.setOperator('=')
vcFilter1.setValue(account)
vc.insertRow(vcrRow)
ServiceRequestVO.appendViewCriteria(vc)
ServiceRequestVO.executeQuery()
int count = 0
count = ServiceRequestVO.getEstimatedRowCount()
//setAttribute('ProblemDescription',count)
def sno=""
def url=""
def ServiceRequestRow =""
def link =""
if(count > 1)
{
def srnum = ""
if(ServiceRequestVO.hasNext()) {
println("inside if !!")
ServiceRequestRow = ServiceRequestVO.next()
sno = ServiceRequestRow.getAttribute('SrNumber');
println("sno : "+sno)
url = "https://<domain>/fscmUI/faces/deeplink?objType=SVC_SERVICE_REQUEST&objKey=srNumber%3D"+sno+"&action=EDIT_IN_TAB";
// link = "<a href='"+""+url+""+"'>"+sno+"</a>"
link = "<html><a href="+""+url+""+">"+sno+"</a></html>"
}
setAttribute('ProblemDescription',link)
}
Tagged:
0