• Teach_me_how
  • NEWBIE
  • 45 Points
  • Member since 2011

  • Chatter
    Feed
  • 2
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 75
    Questions
  • 138
    Replies

Hi

 

I Need to remove duplicate values from a list .I used the following code but still the values in the list are not removed and I get the original list itself.

 

--here Catalogue is my Object

 

Set<SITEdu__Catalog__c>  CaAg = New Set<SITEdu__Catalog__c>();
List<SITEdu__Catalog__c> CaAgListresult = new List<SITEdu__Catalog__c>();
List<SITEdu__Catalog__c> CaAgList = new List<SITEdu__Catalog__c>();
public List<SITEdu__Catalog__c> getStudentAgView()
 {
    CaAgList = [select SITEdu__CatalogType__c from SITEdu__Catalog__c];  
    
    CaAg.addAll(CaAgList);
    CaAgListresult.addAll(CaAg);
    return CaAgListresult;
  }

 

 

Could someone please guide me in getting this done.

 

Thanks in Advance,

 

Regards,

Christwin

HI All,

 

I am having two custom objects 1)  Roof Details__c  2) Electric Usage__c ( lookup to Roof)..

 

I want to put filters in the lookup on Electric usage record on below criteria

 

  • If  Electric usage record is associated with Roof Details like " Ex: ROOF A" then it shldn't show " ROOF A" if  someone wants to associate with  same "ROOF A" record.

 We just need to show the ROOF B, C, D...... in the lookup filter  that are not associated with the other ....

 

Please help me ??? Thanks in Advance ...

 

Let me know if you need more explanation or not clear about the question ??

 

Thanks,

Chenna

How can i create a list of "Report Type" that never been used in any report?

how can a system admin see list view created by user setup as "visible only to me"

Is it possible to create trigger in this object after insert and after delete? How?

I have a requirement to track every action (add status, remove status or edit status) did under the advance setup of campaign page. Does anyone has the idea to achieve this?

Hi Everyone,

 

The company I work for recently ingetrated with a product appexchange. Everything was going fine until our contact from the product we brought in told us that they were getting some apex trigger errors from our system. The error was someting like this: TriggerName: System.LimitException: Apex heap size too large: 6598792. Our contact tells me that one of our custom contacts is take up too much memory and is causing this error. However when I look at it the trigger name is a trigger brought in by the managed package that we brought from the appexchange. I was wondering if there is a way to look into which apex triggers or apex classes are taking up the most memory so that I can make a fix or possible deactivate them. 

 

If you need more explination or anything please let me know.

 

Thanks, 

@Salesforce Admins

 

In the new login page - length of user name field is very short - consulting / development people who use so many logins has problem to identify the user name.

 

I used to have all my user names remembered by browser, it is differentiated by some diff suffix - right now cannot able to see the user name suffix with the provided length of the user name field.

 

Anybody felt the same..

why i dont see the 'related to' field for task or event when im using this report in report builder?

I am a bit of a noob so my question may be simple for someone to answer.  I do give kudos and follow up on threads for those who care about that. 

 

Basically my issue is this:

 

I have a VF page, custom tab and APEX class that is meant to allow a user to go to the tab and see a related list of cases for their contact record.  Their contact record is under an account tha tthey are not supposed to have access to so I thought having the without sharing keyword in the class would work but I am getting an error when I go to that tab as that logged in user.  Since the class operates at the system level why am I getting error messages based on the sharing settings?  Any thoughts would be appreciated.  (Oh, the code works because when I go to that tab as the admin it works as intended)

 

Below is my VF page and Class.

 

<apex:page standardController="Case" extensions="CC_getContact">
    <apex:tabpanel >
        <apex:tab label="Cases">           
                <apex:relatedList list="Cases" subject="{!theContact}"/>
                <style type="text/css">.actionColumn {display:none; visibility:hidden}</style>          
        </apex:tab>
    </apex:tabpanel>

</apex:page>

 

//This Class is used to get the contact record of the current logged in user for use in a visualforce page.  


public without sharing class CC_getContact {
  public Contact theContact { get; set; } // You can use theContact on your page.

  public CC_getContact(ApexPages.StandardController controller) {
    Contact[] c = [SELECT Id FROM Contact WHERE FirstName = :UserInfo.getFirstName() AND LastName = :UserInfo.getLastName() and Email = :UserInfo.getUserEmail()];
    // Make sure you select all the fields you need.
    if(!c.isEmpty()) {
      theContact = c[0];
    }
  }
}

 

The target profile has access to the tab and VF page.  Is there some permission issues posibly?  

Facing a issue with Queue assignment as approver. As we can not dynamically assign queues in Approval Process we are first assigning it to a general user and reassigning it to a queue thru code. But while doing this, only if the current user is with Admin profile it is allowing to assign to a user and then reassign to a queue dynamically. but with restricted profiles(Without Modify All profile Permission) it is not happening. Finer details given below.  

 

Approval Process is on child object(Approval__c -with Public Read/Write setting) of Opportunity(Master detail relationship )

Using Without Sharing in Controller .

 

Code Snippet:

--------------------------------

 

 id QueueId;
    QueueId = [Select queueid from QueueSobject q where SobjectType = 'Approval__c' and q.Queue.Name = :queuename Limit 1].queueid;
    
       
    try
    {
    ProcessInstanceWorkItem workItemList = [Select p.ProcessInstance.Status, p.ProcessInstance.TargetObjectId,p.ProcessInstanceId,p.OriginalActorId,p.Id,p.ActorId From ProcessInstanceWorkitem p where p.ProcessInstance.TargetObjectId =:app and p.actorid=:DGSystemUserId order by createddate desc limit 1];
    workItemList.ActorId = QueueId;
    update workItemList;
    }

 

 

Appreciate your valuable response

I have a scenario wherein I have to assign a record of a custom object to a queue for approval. The record has to go to approver A first, then to approver B and on approval from B, it has to go to a queue. Now, the queue to which the record has to be assigned depends on the district to which the record belongs. Since the number of queues is large, I cannot do this check in the approval process steps as it will run out of the limit of 15 steps for an approval process.

 

           So, I'm trying to populate the queue to which the record has to be routed in a field on the custom object. I'm not able to create a lookup to Queue object. So I tried with lookup to User object, but when I assign a queue Id to this field it throws a DML exception saying 'FIELD_INTEGRITY_EXCEPTION, id value of incorrect type'.

 

How can I assign a queue id to a custom field and use that field to route approvals in my approval processes (there being a constraint that only User lookup fields can be used in approval processes)?