Absent Member.. Shuta Absent Member..
Absent Member..
359 views

How to select the existing interaction by JavaScript

Jump to solution

Hi experts,

 

Does anybody know how to select the existing interaction by JavaScript?

 

What I am trying to do is that

 

1. Click duplicate interaction button

2. Swith the view from the source to the duplicated interaction.

 

I would like to know how to make it realize 2. by JavaScript.

 

Thanks.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: How to select the existing interaction by JavaScript

Jump to solution

Hi,

 

I suggest you to create an object variable type incidents and then through the function doSelect() get the specific interaction.

 

var fIncident=new SCFile("incidents");
var query="incident.id=\"" + <sdNumber> + "\"";
rc=fIncident.doSelect(query);

if (rc != RC_SUCCESS)
{
   print("Open time:  " + fIncident.open_time);
}

 

You could use SCFILE_READONLY and function setFields to make the query more efficient.

 

Regards,

 

If you feel this was helpful please click the KUDOS! thumb below!
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: How to select the existing interaction by JavaScript

Jump to solution

Hi,

 

I suggest you to create an object variable type incidents and then through the function doSelect() get the specific interaction.

 

var fIncident=new SCFile("incidents");
var query="incident.id=\"" + <sdNumber> + "\"";
rc=fIncident.doSelect(query);

if (rc != RC_SUCCESS)
{
   print("Open time:  " + fIncident.open_time);
}

 

You could use SCFILE_READONLY and function setFields to make the query more efficient.

 

Regards,

 

If you feel this was helpful please click the KUDOS! thumb below!
Absent Member.. Shuta Absent Member..
Absent Member..

Re: How to select the existing interaction by JavaScript

Jump to solution

Luis 

 

I have implemented as you suggested. However, cloned interaction is not selected on the display, a parent record remained selected. What I want to realize is that 

Press the 'clone button'(this button is customized one , not standard one ) which creates the cloned interaction, and the screen display will swith from the parent interaction to the cloned one. 

 

If there is something unclear, let me know.

 

Thanks.

0 Likes
Absent Member.. Jagabandhu Absent Member..
Absent Member..

Re: How to select the existing interaction by JavaScript

Jump to solution

Hi,

You can use RAD functions instead of javascript to do this requirement.and alraedy there is a process called "cc.cloneadd" present which can be used.

 

Thanks

Jagabandhu Padhy

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.