You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Deeplink is not working as expected through script

edited Mar 2, 2021 10:52AM in Fusion Service 2 comments

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

21A

Code 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)
}

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!