• Sanjay33
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies

Hi All,

I am trying to Implement the Open CTI using visualforce pages and it doen't seems working.

I refer the documentation: http://wiki.developerforce.com/page/Open_CTI

I installed the package on on my dev account but that demo call interface doesn't seems working, when I call any of the Open CTI standard methods nothing happens for example if I call :

sforce.interaction.isInConsole(mycallback); it never comes back to my callback method.

If I make dummy html page on my machine and define that as my Open CTI interface and call this js

on some button click got response.

 

I try googling lot on this but with no result is anybody have any idea on making this work using the visual force page.

 

 

Thanks

 

 

Hi All,

 

I am having really strange Issue today, I am developing an application in which I integrating some custom modules inside salesforce using external web service call. Last week I make a managed release of it. 

 

Now I am trying to update the web service stubs from my test account also try using ID  and UI, but it comes with same result.

Although every thing is workingon my test account.

 

Save error: The configuration of your org has changed, please reload the page. Missing dependent object: Type:

 

 

I removed content from all the apex class and then try again it is crying with same error.

when I check the dependency of that class from UI it says No dependency but when trying to update it says missing dependency.

 

I am sick now It had killed my whole day,  I am not able to understand am I doing something wrong or this is the wieard behaviour of SFDC. 

If someone can help me out in finding Issue or have  some solutions, or something that I can do to resolve it .

 

 

-Thanks

For any help.

Hi,

 

I have one VF page where I added one command button, on click on this I am redirecting the User to 'New' page of "MyCustomObject" which is Record Type selector page. Now I want to avoid this button click and whenever the User land on this page system should automatically redirect him to New MyCustomObject's page.  But I don't know how to move this logic to Apex.

 

My VF page looks like :

<apex:commandButtonvalue="New Object" action="{!URLFOR($Action.MyCustomObject.New, $ObjectType.MyCustomObject)}"/>

 

 

Thanks in advance.

hi this is my controller and i am marking red where my test case is not covered

 

 

public class Netsmart_Portal_Homepage{

public list<case> opencaserecords{get;set;}
public list<case> closedcaserecords{get;set;}
public list<case> caserecords{get;set;}

public user u{get;set;}
public contact c{get;set;}
public Netsmart_Portal_Homepage(){
u = [Select id,name ,LastName,FirstName,ContactId,Profile.Name from user where id=:UserInfo.getUserId()];
c = [Select LastName,id from Contact where id =:u.Contactid];
caserecords=[select id,CaseNumber,Subject,Status, Priority ,CreatedBy.FirstName,CreatedDate,CreatedBy.id,ClosedDate from case where ContactId=:c.id ];

closedcaserecords=[select id,CaseNumber,Subject,Status, Priority ,CreatedDate,CreatedBy.FirstName,CreatedBy.id,ClosedDate from case where ContactId=:c.id and isclosed=true];

opencaserecords=[select id,Subject,CaseNumber,Status, Priority ,CreatedDate,CreatedBy.FirstName,CreatedBy.id,ClosedDate from case where ContactId=:c.id and isclosed=false];


}
  
}

the error i am getting is

 

System.QueryException: List has no rows for assignment to SObject for contact query 

 

this is my test case

 

@istest
private class Netsmart_Portal_Homepage_Tc
{
static testMethod void validatetest1()
{
Account a = new account();
a.name = 'Test';
a.Type = 'New Customer';
a.BillingState = 'AL';
a.recordtypeid='0127000000014u3';
insert a;


user u=[select id,contactid from user where isactive=true limit 1];
System.RunAs(u){

contact c1=[select id from contact where id=:u.contactid];



case c11=new case();
c11.Subject='aaa';
c11.Status='open';
c11.ContactId=c1.id;
c11.AccountId =a.id;
insert c11;

Netsmart_Portal_Homepage n1 =new Netsmart_Portal_Homepage();
}
}
}




Hi,

 

I have added following Controller and Apex page and when I open the Apex page in browser using https://ap1.visual.force.com/apex/AjaxResponder?q=GetAJAX, value for the parameter "q" i.e. "GetAJAX" is displayed in browser.

 

--Start : Source Code for Controller class

public class AjaxRespController {
    String searchResult;
    /** invoked on an Ajax request */   
    public void doSearch() {
        Map<string,string> params = ApexPages.currentPage().getParameters();
        // Do SOQL query to see if there are any records !
        //List<Contact> records = getRecords(params.get('q'));
        searchResult = params.get('q');      
    }
   
    // Returns the JSON result string
    public String getResult() {
        return searchResult;
    }
}

--End : Source Code for Controller class

 

--Start : Markup for Visualforce page

<apex:page controller="AjaxRespController"  action="{!doSearch}"
contentType="text/plain; charset=utf-8" showHeader="false" standardStylesheets="false" sidebar="false">
{!result}
</apex:page>

--End : Markup for Visualforce page

 

I created Home Page Component and added following following JQuery to call Apex Controller Method, but request is failing.

Also tried using relative path for the URL i.e. "/apex/AjaxResponder". But still reques is failing. Please guide me in resolving this issue.

 

-- "CallApexController" is called on click of a button which is added in page body using JQuery "Append" method in "Body" tag.

 

var j$ = jQuery.noConflict();

 

function CallApexController() {
    j$.ajax({
        type: "GET",
        url:"https://ap1.visual.force.com/apex/AjaxResponder?q=" + searchKeyword,
        contentType: "plain/text; charset=utf-8",
        data: "{}",
        dataType: "json",
        success: AjaxSucceeded,
        error: AjaxFailed
    });
}

function AjaxSucceeded(result) {
    alert('AjaxSucceeded');
}

function AjaxFailed(result) {
    alert('AjaxFailed');
}

 

 

Thanks,

Prasad
 

I recently encountered a scenario where I was able to develop and unit test without issue a controller class containing internal classes. During the deployment process using the IDE, the validation process also Succeeded; however, when I hit the finish button the deployment failed with the following error: 'Dependent class is invalid and needs recompilation ...[reference to test method and code line]... The configuration of your org has changed, please reload the page. Missing dependent object [reference to original class and subclass object]'

I was able to successfully deploy this class when i moved the internal class definitions to the code block instead of the end, but I'm confused as to whether this worked because internal classes must be declared before all other class methods and properties (and if so why it successfully saved to the sandbox environment in the first place) or whether this worked because it somehow forced the recompilation/page reload  alluded to in the error message.

I know it's not an urgent issue but could someone provide some insight as to what's going on so I can better develop similar classes in the future?

  • November 12, 2008
  • Like
  • 0