• Bonaa
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 1
    Replies
Created  presence status which incorporates two service channel, Chat and Case.
Chat routing priority as 0 and case priority as 1.
Case unit of capacity is 4 and Chat is 6.
So I want to make sure that agents are not getting two chats at same time.But there are chances that agent will get two cases at same time and he won't be available for chat.
How we can restrict that agents will get only one case.
  • February 17, 2022
  • Like
  • 0
Created a Chat setup and in the chat button configuration I have given post chat url to external site.
But that site is not loading, it shows refused to connect.
How we can resolve this.
  • November 17, 2021
  • Like
  • 0
Hi 
I have created a lightning component and embedded in Vf page.
It has a field for acoount lookup.When I search for an account name, I will get the five account names not the account name I am searching.
When I use the same component without the the VF page, and when I do search  the search window will pop up with all the results.
Tried with lightning:inputField and force:inputField.
How we can achieve the same functionality in Visualforce page+lightning component

 
  • January 04, 2019
  • Like
  • 0
whether we can use tooling API in the apex code for the org
  • September 02, 2014
  • Like
  • 0
Web service callout failed: Unable to parse callout response. Apex type not found for element Name
I am getting the above error when i tries the query() SOAP API Function
Code:
partnerSoapSforceCom.soap con = new partnerSoapSforceCom.soap();
con .SessionHeader = new partnerSoapSforceCom.SessionHeader_element ();
partnerSoapSforceCom.loginResult  loginResult = new partnerSoapSforceCom.loginResult();
loginResult =con.login('********************','*****************************');
con.endpoint_x =loginResult.ServerUrl;
con.Sessionheader.sessionid = loginResult.sessionid;
partnerSoapSforceCom.queryResult qr = new partnerSoapSforceCom.queryResult ();
qr=con.queryAll('SELECT Id,Name FROM Contact Limit 1');

if query is with ID only its not throwing the error.I tried the same from SoapUI.It works fine.
Error:EXCEPTION: System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element Name
  • July 14, 2014
  • Like
  • 0

Hi

 

I want to know, how we can find  the users available status in chatter through apex

 

 

Thanks

 

 

  • December 05, 2013
  • Like
  • 0
I have a trigger which has test coverage upto 39% but while deploying it is giving error as my trigger coverage is only 0% . could anybody help me out.

my trigger is 

trigger employeedaysoffTrigger on SFDC_PTO_Request__c (after update,after insert) {
    Set<ID> Ids=new Set<Id>();
    Set<ID> bIds=new Set<Id>();
    Decimal d,e,f;
    List<SFDC_Employee__c> emp= new LIST<SFDC_Employee__c>();
    List<SFDC_PTO_Request__c> bbq=new LIST<SFDC_PTO_Request__c>();
    List<SFDC_PTO_Request__c> lq=new LIST<SFDC_PTO_Request__c>();
    //To avoid recursion using static boolean variable
    private static boolean run = true;
   if(TriggerContextUtility.isFirstRun())
    {
         run=false;
    //Take the ids of all newly inserting or updating records
    for(SFDC_PTO_Request__c b:Trigger.New)
    {
        if(b.Employee__c!=null)
        {
          Ids.add(b.Employee__c);
          bIds.add(b.Id);
        }
    }
  
    //list out all values from leave request
    lq= [SELECT id,employee__r.id,employee__r.total_casual_days_off__c,employee__r.total_sick_days_off__c,
         total_casual_leaves__c,total_sick_leaves__c,available_casual_leaves__c,available_sick_leaves__c,
         status__c,type_of_leave__c from SFDC_PTO_Request__c where id =:bIds];
    //Check the status of the leave request after record is approved/rejected
    if(lq[0].status__c == 'Approved')
    {
      
    for(AggregateResult ar:[select Employee__c em,sum(days_off__c) s,sum(casual_days_off__c) c,
                           sum(sick_days_off__c) dos from SFDC_PTO_Request__c
                           where Employee__c in : Ids Group BY Employee__c])
    {
    
        d= (Decimal) ar.get('s');
        e= (Decimal) ar.get('c');
        f= (Decimal) ar.get('dos');
    }
    //Update fields of total casual days off and total sick days off in employee object
    for(SFDC_Employee__c bac:[select id,total_days_off__c,total_casual_days_off__c,total_sick_days_off__c
                         from SFDC_Employee__c where id=:Ids])
    {
       if(lq[0].type_of_leave__c=='Casual Leave')
       {
           bac.total_casual_days_off__c=e;
           emp.add(bac);
          
       }
       else if(lq[0].type_of_leave__c=='Sick Leave')
       {
           bac.total_sick_days_off__c=f;
           emp.add(bac);
       }
    }
    //update available casual and sick leaves fields in leave request object
    for(SFDC_PTO_Request__c l: lq)
    {    
            if(l.type_of_leave__C=='Casual Leave')
            {   
                l.Available_Sick_Leaves__c=l.Total_Sick_Leaves__c-f;
                l.available_casual_leaves__c=l.total_casual_leaves__c-e;
               
                bbq.add(l);
            }
            else if(l.type_of_leave__c=='sick leave')
            {
                l.available_sick_leaves__c=l.total_sick_leaves__c-f;
                l.available_casual_leaves__c=l.total_casual_leaves__c-e;
                bbq.add(l);
            }
    }
    TriggerContextUtility.setFirstRunFalse();
    update bbq;
    update emp;
    }
    }
}

my test class for the above trigger is

@isTest
public class TestTrigger
{
    static testmethod void validateTrigger()
    {
         SFDC_PTO_Request__c spreq= new SFDC_PTO_Request__c(Employee__c='a0EK00000092v59',available_casual_leaves__c=20,available_sick_leaves__c=10);
         insert spreq;       
         spreq=[select id,Employee__c,available_casual_leaves__c,Available_sick_Leaves__c,status__c,type_of_leave__c from SFDC_PTO_Request__c where Employee__c='a0EK00000092v59'];
         System.assertEquals(20,spreq.Available_Casual_Leaves__c);
         System.assertEquals(10,spreq.Available_sick_Leaves__c);
         SFDC_Employee__c emp=new SFDC_Employee__c();
         emp.Total_casual_days_off__c=20;
         emp.Total_sick_days_off__c=10;
         emp.Pan_Number__c='bmplm8889m';
         insert emp;
         emp=[select id,total_days_off__c,total_casual_days_off__c,total_sick_days_off__c
                        from SFDC_Employee__c where id='a0EK00000092v59'];
         System.assertEquals(20,emp.Total_casual_days_off__c);
         System.assertEquals(10,emp.Total_sick_days_off__c);
        
    }
}