• soorya r
  • NEWBIE
  • 5 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 4
    Replies
Hi all,
I am using Open CTI functionality in lightning (For eg: enableClickToDial). In developer org it is working fine. But i have installed the same in any another org, Open CTI API call is not working and it is not send any callback response from CTI  to salesforce. I am not getting any console log and error also. So please help me its urgent!

Here is my callcenter settings in developer org.
call center settingsHere is the sample code from my developer org
<script src="/support/api/48.0/lightning/opencti_min.js" type="text/javascript"></script>

//set width in onload function
sforce.opencti.setSoftphonePanelWidth({widthPX:212,callback:widthCallback});

var widthCallback = function (response) {
     console.log('------width response-------------------'+JSON.stringify(response));
      if (response.errors == null) {
           console.log('width was set successfully! returnValue:', response.returnValue);
      }
      else {
            console.log('Something went wrong! Errors:', response.errors);
      }
};

function setSoftphoneHeight(spHeight){
            console.log('------spHeight-------------------'+spHeight);
            sforce.opencti.setSoftphonePanelHeight({heightPX: spHeight,callback: callback});
}          
        
var callback = function (response) {
      console.log('------height response-------------------'+JSON.stringify(response));
       if (response.errors == null) {
              console.log('Height was set successfully! returnValue:', response.returnValue);
       }
       else {
               console.log('Something went wrong! Errors:', response.errors);
        }
};

function enableClicktoDial() {
      console.log('------enable Click to dial-------------------');
       sforce.opencti.enableClickToDial({callback: enableCallback});
}
       
var enableCallback = function (response) {
           console.log('------enable Click to dial response-------------------'+JSON.stringify(response));
           if (response.errors == null) {
                   console.log('enable click to dial successfully! returnValue:', response.returnValue);
            }
	   else {
	            console.log('Something went wrong! Errors:', response.errors);
	    }
 };

Working org (developer org) Console logs

User-added image

Not working org (Installed Org) console logs

User-added image

Anyone please help me its urgent i could not find out the issue.

Thanks in Advance

Soorya R
Hi All,

I am using Remote action in my code. Now it is working as a asynchronous mode.It is not waiting for the response, it will execute the next set of code. 

Can we make remote action execution as a synchonous one? 
If it is not possible, please tell me the alternative solution for replacing the remote action with synchrounous functionality.

Please help me! It is Urgent!

Thanks in Advance!
 
Hi All,

In my apex code i am using Rest API call out towards the third party Java application. And I am using Jquery Ajax call towards the third party Java application.  

From this i have a doubt, whether this Rest Api callout and Jquery Ajax call is counted against the org API limit in salesforce.
jQuery.ajax({
                type: 'POST',
                url: '{!JSENCODE(endpointURL)}' + '/service',
                data: {
                    SF_session_id: SFSessionId,
                },
                contentType: 'application/x-www-form-urlencoded',
                success: function(response) {
                  ---code here---
                    
                },
                error: function(jqXHR, textStatus) {
});
 
HttpRequest req = new HttpRequest();
	        req.setMethod('POST');
	        req.setHeader('Content-Type','application/x-www-form-urlencoded');
	        req.setTimeout(120000);
	        req.setBody(----request parameters here----);
	        req.setEndpoint(endpointURL);
	        Http http = new Http();
	        HTTPResponse res;
	     
                res = http.send(req);


Please Clarify me. It is Urgent!.

Thnaks in advance!
Hi all,
I am using CTI functionality in lightning. For this i am using enableClickToDial. enableClickToDial is not working suddenly.It shows greyed out in phone column. When click a button i called the enableclicktoDial method but it is not send any callback response from CTI  to salesforce. I am not getting any console log and error also. So please help me its urgent!

Here is my code.
<apex:includeScript value="/support/api/45.0/lightning/opencti_min.js"/>

function enableclicktoDial() {
	sforce.opencti.enableClickToDial({callback: callback});
}
                   
var callback = function(response) {
    if (response.success) {
        console.log('API method call executed successfully! returnValue:', response.returnValue);
	} 
    else {
	    console.error('Something went wrong! Errors:', response.errors);
	}
};
Thanks in advance!
 
Hi all,

I have 3 products in one managed package. But i want to segregate the products by version. Which means for each product i need a different installation URL or for edition (professional/enterprise) i need to maintained different URL in one single managed package. Is it possible? please give some ideas.

Thanks in advance.
 
Hi All,

  I was deleted some pages and classes from managed package, and made a version 3.0 and uploading to appexchange after security review. Now I need to be added those deleted components again to managed package because we couldn’t upgrade the app from lower version to latest version by missing components. It saying the error is

"Salesforce has blocked this package upgrade because the new package version removes some Apex code that one or more Visualforce pages or global Visualforce components need in order to function. Please contact your partner with this error information."

I have checked with the "View deleted components" tab in package there i can only see the components and no option to undelete from there.

User-added image


And i have checked with recycle bin there i couldn't see my deleted components. 

Can any one guide me in dealing with this error.

Pls Urgent!

Thanks in advance!
Hi All,

I have submitted  code for security scanning but i got  "SOQL injection issue". Please any one help me to resolve this.
@RemoteAction
     public static string addrecordtothirdparty(string partId, string AuthToken, string instantURL, string recordIds, string IdAndTag, string MappingJSON) {
       
        WrapperClass.Details detailsWrapper = new WrapperClass.Details();
        try {
            map<Id,map<string,string>> recordLstFnl = new map<Id,map<string,string>>();
            list<Contact> conRecLst     = new list<Contact>();
            list<string> recIdsLst = new list<string>();
            map < String, Schema.SObjectField > contactFields = Schema.SObjectType.Contact.fields.getMap();
			map < String, Schema.SObjectField > accountFields = Schema.SObjectType.Account.fields.getMap();	
            list<Account> acntLst = new list<Account>();
            map<string,Account> acntMap = new map<string,Account>();
            map <String, Object> fieldMapping = (map <String, Object>) JSON.deserializeUntyped(MappingJSON);
            list<string> strLst = new list<string>();
            list<string> acntstrLst = new list<string>();
            
            list<string> IdAndTagLst = IdAndTag.split(',');
            string tag = IdAndTagLst[0];
            string Id = IdAndTagLst[1];
            
            recIdsLst = recordIds.split(',');
            
            for( Object str : fieldMapping.values() ) {
            	if( str != 'record_type') {
            		strLst.add(string.valueof(str));	
            	}	
            } 
               
		    string fieldLst = string.join(strLst,',');
		    string Query = 'select '+fieldLst+' from Contact where Id =: recIdsLst ';
		    conRecLst = Database.query(Query);
It is urgent!!!

Thanks in advance!
 
Hi All,

I have an Open CTI in my lightning org. It was working perfectly before two days. Now when i click utility bar item in utilaity bar it is not showing the item. I was set height and width of the utility bar in app but  it is showing the item as per the utility bar settings. I have added an image for your reference.

User-added image

Utility bar settings image:

User-added image

Please help me it is urgent!!!. Thanks in advance.
Hi All,

I need to add an one custom button on delivered report page like below image. Please help me.

User-added image
Thanks in advance.
 
Hi All,

I am getting the response from third party application by REST API callout. But the response value is coming dynamically ( don't know parameters in response). In response I am getting mapping field which means third party field mapped to Salesforce Field. After that response I will send the salesforce field value to that third party field again based on the response. so that I need to store the response value in wraaper class . So I need to know how to deserialize JSON dynamic response and store the response value in wrapper class. Please help me.

Sample Response 1: 
 {"column_map":{"account_id":"AccountId","account_name":"Account.Name","contact_name":"Name","phone":"Phone","title":"Title","city":"MailingCity","state":"MailingState","email_id":"Email","crm_id":"Id",
"first_name":"FirstName","last_name":"LastName","record_type":"record_type"},"status":"0"}

Sample Response 2: 
{"column_map":{"custom_varchar_6":"Lead_Status__c","custom_varchar_11":"Lead_Source__c","custom_varchar_14":"Lead_3X3__c","custom_varchar_17":"Industry__c","custom_varchar_19":"Notes__c",
"custom_phone_1":"Direct_Phone__c","custom_phone_2":"Mobile__c","custom_varchar_3":"Account_3x3__c","custom_varchar_9":"Competitor__c","custom_varchar_15":"Last_Activity__c","custom_varchar_20":"CL_Call_Attempts__c",
"custom_date_2":"Date__c","account_name":"Company","phone":"Phone","contact_name":"Name","title":"Title","city":"City","state":"State","email_id":"Email","crm_id":"Id","first_name":"FirstName","last_name":"LastName",
"record_type":"record_type"},"status":"0"}

Thanks.
HI All,

I am getting "Internal salesforce.com error" when creating permission set through apex class. Actually I am deleting the existing permission set and create a new permission set with that same name. If the existing permissions set does't have Permission set Assignments then its works fine or  it shows the above error and it is not executed. Please give me suggestion.

Thanks. 
Hi All,

I am Creating reports in SF classic view with formula fields. But when i am using  the same reports in SF ightning view  its not update the formula fields values. I have to edit and  run the reports then only its update the formula fields values and the columns are duplicating when using formula fields.
https://www.screencast.com/t/uIf7syOHh 
https://www.screencast.com/t/on66vSZX9Yav
Please anyone help me. Thanks in Advance.
 
Hi All,

I made changes in formula field of reports and i added one more column in reports then I have created a Package that is managed released. And i have push upgrade this manged package release on other dev org which has lower version. All the other changes (Functionalities,UI) in new version are reflected in that dev org but in reports its not showing the changes what i made in formula field and added column it shows older lower version reports. please help me!! what will I do for showing new version reports? 
Hi all,
I am using a onclick javascript button in contact list view  its working as excepted in contact tab but  When i am clicking the same onclick javascript function in console tab it shows error as 'Cannot read property 'push' undefined' . I don't know ,why i am getting this this error only i am trying in console tab itself? So please anyone help me. the code is below:


    var recordIds = {!GETRECORDIDS($ObjectType.Contact)};
    var phNumbers = [];
    var jsonObject = [];
    var phNum = '';
            
            for(i = 0; i < recordIds.length; i=i+1) {
                var som = idPhoneMap[recordIds[i]];
                phNum = som.substring(0, som.length);
                phNumbers.push(phNum);
                item = {}
                item['id'] = recordIds[i];
                item['phone_number'] = phNum;
                jsonObject.push(item);
            }
  Thanks all.         
    



 
Hi all,

I have a two custom objects with master-detail relationship(Object A-master & Object B-child). In master object(Object A) multitask can be performed by in one process and record will be create in child object(Object B) when each task completed in master object. so that i want to display child records for each task without ending the whole process of master record in standard reports.

I created a standard report for child object but its not updated without ending the whole process of master record. so anyone give suggestions.....

Thanks Advance.
Hi all,

I selected a particular list in listview option. I have to send that particular selected list view id from standard page or get id to use in controller. I am not have any idea and i didn't get related doc. sugggestions plz.Thanks in Advance.
Hi everyone,

I have a requirement to rearrange the order of rows in pageblocktable by dragging or using Up Down button functionality? can anyone please give suggestions and possible methods to achieve this?
Hi all,

Here is my controller:

public with sharing class positionfetch {
    public candidate__c candidate {get;set;}    //Used For get position id
    public candidate__c delrecord {get;set;} 
    public list<candidate__c> cand {get;set;}    //Used For query candidates
    public list<candidatewrapper> selectedcandidates1 {get;set;} 
    public list<candidate__c> selcand {get;set;} 
    public string detail {get;set;}
    public boolean add1 {get;set;}
    public boolean addsec {get;set;}
    public boolean sec {get;set;}
    public string delid {get;set;}
    public string canid;
    public string gender;
    public integer count1;
  
    
    public positionfetch() {
        candidate = new candidate__c();    // initialize the object which is used to empty it
        cand = new list<candidate__c>();
        selcand = new list<candidate__c>();
        delrecord = new candidate__c();
        addsec = false;
        sec = false;
       
     }
        
    public void fetch() {    // fetch the list of record for particular position & gender
        selectedcandidates1 = new list<candidatewrapper>();
        system.debug('^^^^^selectedcandidates1' +selectedcandidates1);
        system.debug('candidate -->>>'+candidate.position_apply_to__c);
        system.debug('candidate -->>>'+candidate.Gender__c);
        canid = candidate.position_apply_to__c;     //Used for assign positionid
        gender = candidate.Gender__c;      //Used for assign gender**/
        String query = 'SELECT Id, Name, Education_qualification__c,address__c FROM candidate__c WHERE Id != Null ';   // Dynamic SoQL Query
        
        if(gender == null) {
            query += 'AND position_apply_to__c =: canid';
            sec = true;
        }
         
        else {
            query += 'AND position_apply__to_c =: canid AND gender__c =: gender';
            sec = true;
        }
        cand = Database.query(query);
        system.debug('--->'+cand.size());
        
            for(candidate__c can : cand) {   // add records to wrapperlist
                candidatewrapper candInst = new candidatewrapper();
                candInst.candidate1 = can;
                selectedcandidates1.add(candInst);
            }    
                   system.debug('^^^^^selectedcandidates1' +selectedcandidates1);
           
            if(cand.size() == 0) {
                sec = false;
                system.debug('*****sec' +sec);
                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO,'There is no child records to display')); 
               
            }
                add1 = true;
               addsec = false; 
             
    }
    
    public pagereference detailpage() {      // while click link leads to detailpage of record
        system.debug('---->>detail' +detail);
        pagereference page;
        page = new pagereference('/'+detail);
        page.setredirect(true);
        return page;
    }
    
  
    public void Deleterecord() {    //  Delete records from object
       system.debug('$$$$$$$$$$$$$' +delid);
       try {
       count1 = [select count() from candidate__c where id = : delid];
       delrecord = [select id, name, address__c, Education_qualification__c from candidate__c where id=: delid];
       if(count1 > 0) {
            system.debug('----->>>' +delrecord);
            delete delrecord;        
            system.debug('lllll' +delrecord);
            fetch();
       }
       }
       catch(Exception e) {
               system.debug('--->>>e' +e);
       }
       
    }
    
    
    public void selectedcandidates() {     //display selected records
        addsec =false;
           system.debug('selectedcandidates1 --------------->>>'+selectedcandidates1);
        selcand = new list<candidate__c>();
        for(candidatewrapper candwrap : selectedcandidates1) {
            if(candwrap.isselected == true) {
                  addsec = true;
                  selcand.add(candwrap.candidate1);
                  system.debug('----->>>>>>selcand' +selcand.size());
            } 
        }
        if(selcand.size() == 0){
            addsec =false;
            system.debug('======' +selcand.size());
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.error,'Please select the candidates'));
        }
     }
                          
    public class candidatewrapper{    //wrapper class for candidate
        public candidate__c candidate1 {get;set;} 
        public boolean isselected {get;set;}
               
        public candidatewrapper() {
            isselected = false;
        } 
    }

}

Here is my Test class for above controller:

@isTest
public class Testpositionfetch {
    public static testmethod void method1() {
        position__c pos = new position__c();
        pos.Name = 'sss';
        pos.Skills_Requried__c = 'JAVA';
        pos.close_date__c = Date.parse('12/9/2015');
        insert pos;
        
        candidate__c candidate = new candidate__c();
        candidate.Name = 'ss1';
        candidate.position_apply_to__c = pos.id;
        candidate.Education_Qualification__c ='BE';
        candidate.Gender__c ='male';
        insert candidate;
        
        Test.StartTest();
        
        PageReference pageref = Page.positionfetch;
        pageRef.getParameters().put('id', String.valueOf(candidate.Id));
        Test.setCurrentPage(pageref);
        
        positionfetch position = new positionfetch();
        positionfetch.candidatewrapper CandInst = new positionfetch.candidatewrapper();
        list<positionfetch.candidatewrapper> CandWrapList = new list<positionfetch.candidatewrapper>();
        CandInst.candidate1 = candidate;
        CandInst.isselected = true;
        CandWrapList.add(CandInst);
        position.selectedcandidates1 = CandWrapList;
        position.fetch();
        position.detailpage();
        position.delid = candidate.id;
        position.Deleterecord();
        position.selectedcandidates();
        Test.StopTest();
    }
    
    public static testmethod void method2() {
        position__c pos = new position__c();
        pos.Name = 'sss';
        pos.Skills_Requried__c = 'JAVA';
        pos.close_date__c = Date.parse('12/9/2015');
        insert pos;
        
        candidate__c candidate = new candidate__c();
        candidate.Name = 'ss1';
        candidate.position_apply_to__c = pos.id;
        candidate.Education_Qualification__c ='BE';
        insert candidate;
        
        Test.StartTest();
        
        PageReference pageref = Page.positionfetch;
        pageRef.getParameters().put('id', String.valueOf(candidate.Id));
        Test.setCurrentPage(pageref);
        
        positionfetch position = new positionfetch();
        positionfetch.candidatewrapper CandInst = new positionfetch.candidatewrapper();
        list<positionfetch.candidatewrapper> CandWrapList = new list<positionfetch.candidatewrapper>();
        CandInst.candidate1 = candidate;
        CandInst.isselected = false;
        CandWrapList.add(CandInst);
        position.selectedcandidates1 = CandWrapList;
        position.fetch();
        position.detailpage();
        //position.delid = candidate.id;
        position.Deleterecord();
        position.selectedcandidates();
        Test.StopTest();
    }
}    


    
I am having 88% code coverage only i want to acheive 100% coverage is there any wrong plz help me!. Thanks in Advance
Hi all,
I am using Open CTI functionality in lightning (For eg: enableClickToDial). In developer org it is working fine. But i have installed the same in any another org, Open CTI API call is not working and it is not send any callback response from CTI  to salesforce. I am not getting any console log and error also. So please help me its urgent!

Here is my callcenter settings in developer org.
call center settingsHere is the sample code from my developer org
<script src="/support/api/48.0/lightning/opencti_min.js" type="text/javascript"></script>

//set width in onload function
sforce.opencti.setSoftphonePanelWidth({widthPX:212,callback:widthCallback});

var widthCallback = function (response) {
     console.log('------width response-------------------'+JSON.stringify(response));
      if (response.errors == null) {
           console.log('width was set successfully! returnValue:', response.returnValue);
      }
      else {
            console.log('Something went wrong! Errors:', response.errors);
      }
};

function setSoftphoneHeight(spHeight){
            console.log('------spHeight-------------------'+spHeight);
            sforce.opencti.setSoftphonePanelHeight({heightPX: spHeight,callback: callback});
}          
        
var callback = function (response) {
      console.log('------height response-------------------'+JSON.stringify(response));
       if (response.errors == null) {
              console.log('Height was set successfully! returnValue:', response.returnValue);
       }
       else {
               console.log('Something went wrong! Errors:', response.errors);
        }
};

function enableClicktoDial() {
      console.log('------enable Click to dial-------------------');
       sforce.opencti.enableClickToDial({callback: enableCallback});
}
       
var enableCallback = function (response) {
           console.log('------enable Click to dial response-------------------'+JSON.stringify(response));
           if (response.errors == null) {
                   console.log('enable click to dial successfully! returnValue:', response.returnValue);
            }
	   else {
	            console.log('Something went wrong! Errors:', response.errors);
	    }
 };

Working org (developer org) Console logs

User-added image

Not working org (Installed Org) console logs

User-added image

Anyone please help me its urgent i could not find out the issue.

Thanks in Advance

Soorya R
Hi all,
I am using CTI functionality in lightning. For this i am using enableClickToDial. enableClickToDial is not working suddenly.It shows greyed out in phone column. When click a button i called the enableclicktoDial method but it is not send any callback response from CTI  to salesforce. I am not getting any console log and error also. So please help me its urgent!

Here is my code.
<apex:includeScript value="/support/api/45.0/lightning/opencti_min.js"/>

function enableclicktoDial() {
	sforce.opencti.enableClickToDial({callback: callback});
}
                   
var callback = function(response) {
    if (response.success) {
        console.log('API method call executed successfully! returnValue:', response.returnValue);
	} 
    else {
	    console.error('Something went wrong! Errors:', response.errors);
	}
};
Thanks in advance!
 
Hi All,

In my apex code i am using Rest API call out towards the third party Java application. And I am using Jquery Ajax call towards the third party Java application.  

From this i have a doubt, whether this Rest Api callout and Jquery Ajax call is counted against the org API limit in salesforce.
jQuery.ajax({
                type: 'POST',
                url: '{!JSENCODE(endpointURL)}' + '/service',
                data: {
                    SF_session_id: SFSessionId,
                },
                contentType: 'application/x-www-form-urlencoded',
                success: function(response) {
                  ---code here---
                    
                },
                error: function(jqXHR, textStatus) {
});
 
HttpRequest req = new HttpRequest();
	        req.setMethod('POST');
	        req.setHeader('Content-Type','application/x-www-form-urlencoded');
	        req.setTimeout(120000);
	        req.setBody(----request parameters here----);
	        req.setEndpoint(endpointURL);
	        Http http = new Http();
	        HTTPResponse res;
	     
                res = http.send(req);


Please Clarify me. It is Urgent!.

Thnaks in advance!
Hi all,
I am using CTI functionality in lightning. For this i am using enableClickToDial. enableClickToDial is not working suddenly.It shows greyed out in phone column. When click a button i called the enableclicktoDial method but it is not send any callback response from CTI  to salesforce. I am not getting any console log and error also. So please help me its urgent!

Here is my code.
<apex:includeScript value="/support/api/45.0/lightning/opencti_min.js"/>

function enableclicktoDial() {
	sforce.opencti.enableClickToDial({callback: callback});
}
                   
var callback = function(response) {
    if (response.success) {
        console.log('API method call executed successfully! returnValue:', response.returnValue);
	} 
    else {
	    console.error('Something went wrong! Errors:', response.errors);
	}
};
Thanks in advance!
 
Hi All,

  I was deleted some pages and classes from managed package, and made a version 3.0 and uploading to appexchange after security review. Now I need to be added those deleted components again to managed package because we couldn’t upgrade the app from lower version to latest version by missing components. It saying the error is

"Salesforce has blocked this package upgrade because the new package version removes some Apex code that one or more Visualforce pages or global Visualforce components need in order to function. Please contact your partner with this error information."

I have checked with the "View deleted components" tab in package there i can only see the components and no option to undelete from there.

User-added image


And i have checked with recycle bin there i couldn't see my deleted components. 

Can any one guide me in dealing with this error.

Pls Urgent!

Thanks in advance!
Hi all,

I selected a particular list in listview option. I have to send that particular selected list view id from standard page or get id to use in controller. I am not have any idea and i didn't get related doc. sugggestions plz.Thanks in Advance.