• Aswin B S
  • NEWBIE
  • 20 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 4
    Replies
I am trying to send a response to chat from code using the sendMessage method. 
This is the syntax:
sforce.console.chat.sendMessage(chatKey:String, message:String, callback:Function)
I have also included <apex:includeScript value="/support/console/52.0/integration.js"/>
Still I am getting error while runing LIVE AGENT: Error: ReferenceError: sforce is not defined
Hi,

I have a custom component which provides lookup records based on the value entered. It is used in vf page inside a form. How can I fetch the value selected in the custom controller in my vf page javascript as soon as a value is selected.

Thanks

Here is the outline of code
<apex:page>
<script> Need the value here </script>
<c:customComponent/>
</apex:page>
<apex:page controller="PopUp" showHeader="false" standardStylesheets="false" sidebar="false">
    <script>
        function myJavascriptFunc()
        {
            CallApexMethod();
        }
    </script>
    <apex:form >
    <apex:actionFunction name="CallApexMethod" action="{!IF(check,alert('PopUp'),'')"/>
          <apex:pageBlock >
                <apex:pageBlockButtons>
                    <apex:commandButton value="Hit Me" action="{!myActionInController}" onclick="myJavascriptFunc();"/>
                </apex:pageBlockButtons>
          </apex:pageBlock>
    </apex:form>
</apex:page>
 
I am trying to send a response to chat from code using the sendMessage method. 
This is the syntax:
sforce.console.chat.sendMessage(chatKey:String, message:String, callback:Function)
I have also included <apex:includeScript value="/support/console/52.0/integration.js"/>
Still I am getting error while runing LIVE AGENT: Error: ReferenceError: sforce is not defined
Hi,

I have a custom component which provides lookup records based on the value entered. It is used in vf page inside a form. How can I fetch the value selected in the custom controller in my vf page javascript as soon as a value is selected.

Thanks

Here is the outline of code
<apex:page>
<script> Need the value here </script>
<c:customComponent/>
</apex:page>