Add the following code immediately after the FetchConnectionFromLinkein method:
function GetConnectionByName(fName, lName){
var connection = null;
if(fName && lName){
var linkedInRecSet = this.Get("linkedINRecordSet");
for(var i = 0; i < linkedInRecSet.length; i++){
var current = linkedInRecSet[i];
if(current.firstName === fName && current.lastName === lName)
{connection = current;break;}}
}
return connection;
}
function QueryForRelatedContacts(){
var currentMark = this.Get("linkedINMarker");
var recordSet = this.Get("linkedINRecordSet");
var firstName = "";
var lastName = "";
for(var i = currentMark; i < currentMark + 5; i++){
var current = recordSet[i];
firstName = firstName + current["firstName"];
lastName = lastName + current["lastName"];
if(i < (currentMark + 4))
{firstName = firstName + " OR ";
lastName = lastName + " OR ";
} }
if(firstName !== "" || lastName !== ""){
SiebelApp.S_App.GetActiveView().ExecuteFrame(
this.Get("GetName"),
[
{field : "Last Name" , value : lastName},
{field : "First Name", value : firstName}]);
}
}
where:
GetConnectionByName
uses the first name and last name to get the connection information stored on the client. Siebel Open UI gets this information from LinkedIn.
QueryForRelatedContacts
is the presentation model method that uses the subset of the LinkedIn connection record that Siebel Open UI sets to query the Siebel Server for matching records. The notification causes Siebel Open UI to call the BindData method of the physical renderer as part of the reply processing. The BindData method updates the user interface with the matching set of records from server. For more information, see Notifications That Siebel Open UI Supports and GetActiveView Method.