0

I have created the custom chat page and i want the live agent user name to appear on custom chat window.I am using live agent session object to get live agent user name but i am getting the following error "Error: Compile Error: expecting a right angle bracket, found 'Agent' at line 6 column 19"....also tell me what should be the select query.

<apex:page controller="livegentclass">
<apex:image value="{!$Resource.chaton}"/>
<liveAgent:clientchat >
   <liveAgent:clientChatSaveButton label="Save Chat" />
    <liveAgent:clientChatEndButton label="End Chat" />
    <div id="prechatdata">
    </div>
    <div style="top: 5px; left: 5px; right: 5px; bottom: 5px;
        position: absolute; z-index: 0;">
    <liveAgent:clientChatAlertMessage />
    <liveAgent:clientChatStatusMessage />
    <table id="waitingMessage" cellpadding="0" cellspacing="0">
    <tr>
    <td>Please wait while you are connected to an available agent.</td>
    </tr>
    </table>
    <div style="top: 0; right: 0; bottom: 41px; left: 0; padding: 0;
        position: absolute; word-wrap: break-word; z-index: 0;">
    <liveAgent:clientChatLog />
    </div>
    <div style="position: absolute; height: auto; right: 0; bottom: 0; left: 0;
        margin-right: 67px;">
    <liveagent:clientChatInput /><liveAgent:clientChatSendButton label="Send"/>
    </div>
    </div>
</liveAgent:clientchat>
</div>
</apex:page>

Code for Liveagentclass:

public with sharing class liveagentclass {
String AgentId;
public liveagentclass (){
AgentId=Apexpages.currentpage().getparameters().get('id');
}
  public List<Live Agent Session> las {get;set;}
las=select query....
}
Samuel De Rycke
  • 9,550
  • 8
  • 45
  • 73
user3725299
  • 51
  • 2
  • 7
  • You can't have spaces in type names so Live Agent Session in your code is not valid and perhaps should be LiveAgentSession. But I don't even know if such an object exists in queryable form; hopefully someone with Live Agent experience will provide a full answer. – Keith C Jun 28 '14 at 10:24
  • thanks for the reply ,thats the issue i am facing ..ther was another technique to get liveagent user detail using javascript..but even that is not working – user3725299 Jun 28 '14 at 10:30
  • If you have seen examples of the JavaScript approach use that. You can debug your JavaScript yourself as described in How do I start to debug my own Visualforce/JavaScript?. – Keith C Jun 28 '14 at 10:36
  • The JavaScript approach is on the right track. LiveAgentSession is not created for every chat - it represents the activity of an Agent. – AndyLintner Jun 30 '14 at 15:06
  • Thanks for reply ,..Getting user name is solved using merge fields in liveagentconfig page.Now i using soql query to get current agent/user photo but its giving me the salesforce default profile pic.Where am i going wrong please help me out. I have attatched the controller code below public class CustomChatWindowController{ public String profileImageUrl {get; set;}Public String uid{get;set;} List lstuser; public CustomChatWindowController(){uid=Userinfo.getUserId();lstuser = [Select FullPhotoUrl from User where id=:uid];profileImageUrl=lstuser[0].FullPhotoUrl;}} – user3725299 Jul 01 '14 at 05:48

0 Answers0