• saraha@groupesci.com
  • NEWBIE
  • 60 Points
  • Member since 2010

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

Hi,

I'm trying to build a query that will overcome the issue the TASK object and use it in Semi-joint queries. What I'm trying to do it to create a list and then, create another list on the same controler, where the records are NOT in the first list. here is the code:

 

private List<task> tskNO;
  public List<task> gettskNO()

    {
     candDate1=candDate-Integer.valueOf(rangedate);
    TAsk[] tskNO = [Select WhoID FROM task WHERE OwnerID = :UserInfo.getUserId() and createddate >= :candDate1];
    return tskNO;
    }

  private List<Contact> ContactNO;
  public List<Contact> getContactNO()
   {
Contact[] ContactNO = [Select c.id, c.AccountId from Contact c WHERE c.ID NOT IN :tskNO];
   return ContactNO;
   }

 

But I'm getting a "invalid binding" error on the "  :tskNO "  .

 

Is there a way to bind the criteria to another List on the controller?

 

Thanks!

Hi,

 

I am reciving the below error while inserting a record into a custom object using sControl and Ajax. Any help in resolving this is highly appreciate.

 

 

{faultcode:'sf:INVALID_TYPE', faultstring:'INVALID_TYPE: sObject type 'CSP_Tracking__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.', detail:{InvalidSObjectFault:{exceptionCode:'INVALID_TYPE', exceptionMessage:'sObject type 'CSP_Tracking__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.', row:'-1', column:'-1', }, }, }

 

-------------------------------Code---------------------

 

<apex:page sidebar="false" showHeader="false">

<!--  Begin Default Content REMOVE THIS -->

 

<script type="text/javascript">

     var __sfdcSessionId = '{!GETSESSIONID()}';

</script>

 

<script src="../../soap/ajax/21.0/connection.js" type="text/javascript"></script>

     <script type="text/javascript">

window.onload = setupPage;

     function setupPage() {

       //function contains all code to execute after page is rendered 

 

var Tracking = new sforce.SObject("CSP_Tracking__c");

Tracking.Session_ID__c = __sfdcSessionId;

Tracking.CSP_Page_URL__c = parent.location.href;

Tracking.User_ID__c = "{!$User.Id}";

       var result = sforce.connection.create([Tracking], {

       onSuccess : success,

     onFailure : failure

     }

);

 

   function success(result) {

     if (result[0].getBoolean("success")) {

 alert("new account created with id " + result[0].id);

} else {

 alert("failed to create account " + result[0]);

}

}

 

function failure(error) {

//document.getElementById("output").innerHTML = error;

document.write(error);

//alert(error);

  }

   }

 

  

  

   //alert(parent.location.href);

   </script>

 

</apex:page>

 

 

Thank you very much,

Sampath

Error

Hello All,

 

So I have a nice read only page that gets tons of records from the controller. The trouble is, when I write a unit test for the controller it fails because I get more than 50k records!

 

Any suggestions?

 

Thanks!

Hello,

 

I am trying to use an ExtJS grid (v 3.3.1) on the same page as an EnhancedList component, but the grid does not display if the component is there. I have the same issue on two different orgs and with a very simple grid example.

 

Has anyone had this issue or know what to do?

 

Thanks!
 --Sarah

 

Hello,

I have a custom component that contains an EnhancedList. It works fine in FireFox and in IE but in Chrome the grid inside the EnhancedList does not show. I have stripped the code down to the absolute minimum but it still doesn't work. Has anyone encountered this?

 

Thanks!

 --Sarah

 

Here is the code:

 

Component:
<apex:component>
  <apex:enhancedList id="mylist" type="Account" height="300"/>
</apex:component>

 

 

Page:

 

<apex:page >

  <c:EnhancedRelatedList2 />

</apex:page>

 

Hello,

 

I understand that there are limits on a Professional Edition that can be increased/removed for an Aloha App. In the documentation, it states:

 

========================================================

Apps/Objects/Tabs Limit Immunity

All salesforce.com editions have limits that restrict the number of apps, objects, and tabs that can be used. Normally this limit would be a problem if your prospective customer is already using their entire allotment of apps, objects, or tabs, but there exists a special permission that allows your app to be exempt from those limits. This means your app can be installed into any org without worrying about the normal app, object, or tab limits. To be sure, there are additional limits that will still be in effect, but they are listed here in documentation. For instance, if you have any custom objects with more than 100 custom fields, or you have more than 50 custom record types, your app will not install in GE or PE.

========================================================

 

Does this mean that if our app is certified as an Aloha App that we can request a higher limit for custom fields? It suggests about that each object can have 100 fields

 

Thanks in advance!

 --Sarah Andrews

Hello,


We are planning to use base and extension packages in our AppExchange product and would like to know how base and extension packages behave during update and upgrades. More specifically:


1. What is the behaviour of updates to a base package? If there is an extension package installed, will any components (e.g. page layout, field label) in the extension package be overwritten with those in the base when the base is updated or upgraded?


2. Do extension packages follow the same guidelines as for base managed packages (as outlined in Appendix B of Developing Packages for Distribution)? Are the same items updatable/upgradable?


3. Can we package updates to extension and base packages together?

 

Thanks so much!

 --Sarah Andrews

Hello All,

 

So I have a nice read only page that gets tons of records from the controller. The trouble is, when I write a unit test for the controller it fails because I get more than 50k records!

 

Any suggestions?

 

Thanks!

I am trying to create a trigger that updates the Parent account and any children (all children and parents are account objects). If acc_Field1 = "Yes", then DNM__c should be TRUE in both the child and parent accounts.

 

 

If (acc_Field1 = 'Yes')

{

/*Logic Here To Update All Accounts to DNM__c that are Related to it

}

 

In the above code I always hit the limit for DML statements.  I think it is because when I update other accounts the trigger keeps firing in an infinite loop. Does anyone have any ideas? 

I have been trying to understand test methods but I can't seem to grasp them.  Here is the controller that I have if anyone could give me some tips or explain how test methods work that would be great thanks. 

 

Controller that needs a test method:

 

 

public class SearchController {
    
    public String Searchtxt {get; set;}
    public List<refWrapper> refWraps {get; set;}
    List<Need__c> needlist = [SELECT Name, Id, Requirement_Number__c, Bounty__c, Bounty_Other__c, Bounty_Rules__c FROM Need__c ORDER BY Name];
    public Referral__c referral{
    get{if(referral == null) referral = new Referral__c();
    referral.Partner__c = ApexPages.currentPage().getParameters().get('id');
    return referral;} set;}
    
    public PageReference SearchId() {
        needlist = [SELECT Name, Id, Requirement_Number__c, Bounty__c, Bounty_Other__c, Bounty_Rules__c FROM Need__c WHERE Requirement_Number__c =:Searchtxt];
        if(Searchtxt == '' || Searchtxt == null) needlist = [SELECT Name, Id, Requirement_Number__c, Bounty__c, Bounty_Other__c, Bounty_Rules__c FROM Need__c ORDER BY Name];
            refWraps = new List<refWrapper>();
            for(Need__c N : needList){
               refWrapper recWrap = new refWrapper();
               recWrap.need=n;
               recWrap.checked = false;
               refWraps.add(recWrap);
            }
        return null;
    }
    public SearchController(){
         refWraps = new List<refWrapper>();
           for (Need__c n : needList)
           {
               refWrapper recWrap = new refWrapper();
               recWrap.need=n;
               recWrap.checked = false;
               refWraps.add(recWrap);
           }
    }
        public PageReference ReferralSelect() {
            
            for(refWrapper ref : refWraps){
                if(ref.checked){
                    referral.Need__c = ref.need.id;
                }
            }
            insert referral;
            PageReference tosecondpage = Page.leadstep1;
            tosecondpage.getParameters().put('Id',referral.Id);
            tosecondpage.setRedirect(true);
            return tosecondpage;
    }
    
    
    public class refWrapper{
        public Referral__c ref {get; set;}
        public Need__c need {get; set;}
        public Boolean checked {get; set;}
    }
    
    public PageReference Logout(){
        return Page.LeadRegistration;
    }
    
    
}

 

 

Hi,

 

I just started learning Apex. Can you please post the links or send me the material that provides Apex Code basic programs/sample exercises/ practice exercises. I didnt see many example programs/sample exerceses in Apex Developers Guide.

Also please advice me on how to learn Apex in efficient way.

 

Thanks,

Priyanka.

In the Solutions tab, we would like to be able to quantify which of our solutions are the most popular (most viewed) by our users. At the moment there is no way to do this.. 

I posted a related question a little while back and got some good ideas, but I'm still struggling with writing my first trigger. It should be simple enough: 

 

Opportunity has a Contact related through a lookup field on Opportunity. When Opportunity stage is Active, I want related contact status (Instructor_Status__c; it's a picklist) to change to Employed. 

When Opportunity Stage is not Active, I want related contact status to change to Available. 

 

If it matters, Opportunity:Contact is One:Many. 

 

I have so far: 

 

trigger OpportunityRelatedContact on Opportunity (after insert, after update) { 
{
list<Contact> Listofinstructors = new list<Contact>();

for (Opportunity A : trigger.new)
{

Contact instructor = new Contact(Id = A.InstructorName__c);
listofinstructors.add(Instructor);

if(A.StageName=='Active'){
instructor.Instructor_status__c='Employed';}
}
}
}

 

It's obviously not there yet, and I don't know if I have the right approach. Any help is appreciated. 

We are using OrchestraCMS for our website CMS tool on Sites. However we need to add a custom component with its own custom controller to the page template. The problem is when I try to use it in Orchestra I get the following error:

 

Custom Controller cms.mycustomcontroller does not exist.

 

This makes perfect sense as mycustomcontroller is not in the cms namespace. That's OrchestraCMS's namespace. I am not using any name space. But it seems to insist that all controllers on the page are in the cms namespace. OrchestraCMS says this is outside what they will support.

 

So any ideas on how to have a custom component controller with a different namespace (or no namespace) on a page with a namespaced custom controller?

 

Thanks,

Dovid

Hi,

I'm trying to build a query that will overcome the issue the TASK object and use it in Semi-joint queries. What I'm trying to do it to create a list and then, create another list on the same controler, where the records are NOT in the first list. here is the code:

 

private List<task> tskNO;
  public List<task> gettskNO()

    {
     candDate1=candDate-Integer.valueOf(rangedate);
    TAsk[] tskNO = [Select WhoID FROM task WHERE OwnerID = :UserInfo.getUserId() and createddate >= :candDate1];
    return tskNO;
    }

  private List<Contact> ContactNO;
  public List<Contact> getContactNO()
   {
Contact[] ContactNO = [Select c.id, c.AccountId from Contact c WHERE c.ID NOT IN :tskNO];
   return ContactNO;
   }

 

But I'm getting a "invalid binding" error on the "  :tskNO "  .

 

Is there a way to bind the criteria to another List on the controller?

 

Thanks!