• Jancy Mary
  • NEWBIE
  • 114 Points
  • Member since 2015
  • Software Engineer
  • Revature Consultancy Services Limited

  • Chatter
    Feed
  • 2
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 28
    Replies
Hello All,

Need some information, suppose I have 2 fields called Age & DOB in a controller, these are not a getter setter fields, I have a button on the VF page, when I click the button these fields should get loaded to the page, how to achieve this.

Thanks in advance.
Jancy
HI, I have a scenario, where I need to make a Tab visible or insible for Users, based on a checkbox checked for that User.
Kindly help me achieve this.
Hey guys,

Need some help, I have a apex class with soql query on Reports of type (Task & Events) in the UAT, the reports for now returns 0 records as I have some filters as Date = Last 30 Days, I'm not able to cover the query line in test class as the report result 0 count, if the same report result atleat 1 record the query line are covered in the test class. Rest all the code lines are covered except these query lines.

Also a question, while moving the code from sandbox to production through change set will the test class validate against production org data or sandbox.

Thanks in advance,
Jancy Mary
Hello All ,

I have a requirement where i need to stop sending the email notification to the customer, when the field name "SRR is NO".This field is going to be updated by one of the user.Once it is updated how can i stop sending email.How can i achieve this.Any help very much appreciated.
Why do we need a custom extension when we are using a custom controller .
Please help me on this.

Thanks.
Hi All,

Placement object has a lookup relationship to Account and Contact, I want to show the number of placements on each Account, however if multiple Placements are associated to the same Contact in different interval of time period which intern is associated to particular Account, then all those Placements which are associated to that Contact should be considered as 1 count under that particular Account. 

I tried writing the below apex class, but stuck in the middle. With the below code I am able to fetch the ContactID and the AccountID when a placement record is inserted, however I am unable to compare the Contact's Account with the fetched AccountID. Or if there is any alternative way to achieve this please suggest.


public class totalOfPlacementsTriggerHelper{

 public static void handleAfterInsert(List<rnm__Placement__c> placementlist)
  {
    List<Account> acc= new List<Account>();
    Set<Id> accActiveId= new Set<Id>();
    Set<Id> conId= new Set<Id>();
  
      for(rnm__Placement__c p: placementlist)
      {
        if(p.Active__c==True)
        {
        if(p.rnm__Employer__c!=null && p.rnm__Contact__c!=null)   //rnm__Employer__c is a lookup to Account
        {
        accActiveId.add(p.rnm__Employer__c);
        conId.add(p.rnm__Contact__c);
        system.debug('TESTING'+accActiveId+' '+conId);
        }
      } 
      }
}


Thanks in Advance,
Jancy Mary
I'd like to start working with the macros in the Service Cloud Console, but each help article begins with "Click the Macros widget in the bottom right of your screen." Yet, I don't see it. I'm a Sys Admin, so I have read/edit access to the macros object. Any ideas?
Hi I need to write test class for this please tell me how to write.It has reports and dashboards.
public class Embedded_Analytics_Extn{
    
    public Id AccPlanId{get; set;}
    public GE_HQ_Account_Plan__c aPlan{get;set;}
    public String DashId{get; set;}
    public String Report0Id{get; set;}
    public String Report0Name{get; set;}
    public String Report1Id{get; set;}
    public String Report1Name{get; set;}
    public String Report2Id{get; set;}
    public String Report2Name{get; set;}
    public String Report3Id{get; set;}
    public String Report3Name{get; set;}
    public String Report4Id{get; set;}
    public String Report4Name{get; set;}
    public String Report5Id{get; set;}
    public String Report5Name{get; set;}
    public String Report6Id{get; set;}
    public String Report6Name{get; set;}
    
    public String AccPlanName{get; set;}
    Public String DDUNS{get; set;}
    public List<SelectOption> tiers{get;set;}
    public String tier2{get;set;}
    public String tier3{get;set;}
    public String accName{get;set;}
    public Embedded_Analytics_Extn(ApexPages.StandardController controller){
        //Report r0=[select id,name,developerName from Report where developerName='TOTAL_CurrYr_IFRU'];
        //Report0Id=r0.id;
        //Report0Name=r0.name;
        Report r1=[select id,name,developerName from Report where developerName='OG_Tier_1_O_G_Region_Current_Year'];
        Report1Id=r1.id;
        Report1Name=r1.name;
        Report r2=[select id,name,developerName from Report where developerName='OG_Forecast_by_PL_Current_Year'];
        Report2Id=r2.id;
        Report2Name=r2.name;
        Report r3=[select id,name,developerName from Report where developerName='OG_Tier_2_Account_Region_Current_Year'];
        Report3Id=r3.id;
        Report3Name=r3.name;
        Report r4=[select id,name,developerName from Report where developerName='OG_SalesMgr_Current_Year_OPEN'];
        Report4Id=r4.id;
        Report4Name=r4.name;
        Report r5=[select id,name,developerName from Report where developerName='OG_Oppty_by_Stage_Current_Year'];
        Report5Id=r5.id;
        Report5Name=r5.name;
        Report r6=[select id,name,developerName from Report where developerName='OG_SalesMgr_Current_Year_Forecast'];
        Report6Id=r6.id;
        Report6Name=r6.name;
                
        DashId=[select id,developerName from Dashboard where developerName='OG_Account_Plan_Dashboard'].id;
        List<DashboardComponent> comp=[select id,name from DashboardComponent where DashboardId=:DashId];
        Map<String,DashboardComponent> DashCompMap=new Map<String,DashboardComponent>();
        for(DashboardComponent c: comp){
            DashCompMap.put(c.name,c);    
        }
        this.aPlan=(GE_HQ_Account_Plan__c)controller.getRecord();
        GE_HQ_Account_Plan__c AccPlan=[select id,name,GE_HQ_DDUNS_fm__c,GE_HQ_DDUNS_Number__c from GE_HQ_Account_Plan__c where id=:aPlan.Id];
        
        AccPlanName=AccPlan.Name;
        DDUNS=AccPlan.GE_HQ_DDUNS_fm__c;
        Account acc=[select id,name from Account where id=:AccPlan.GE_HQ_DDUNS_Number__c];
        this.accName=acc.name;
        /*
        tiers=new List<SelectOption>();
        tiers.add(new SelectOption('','None'));
        tiers.add(new SelectOption('Turbo Machinery','Turbo Machinery'));
        tiers.add(new SelectOption('PII Pipeline Solutions','Pipeline Solutions'));
        tiers.add(new SelectOption('Global Services (GS)','Global Services'));
        tiers.add(new SelectOption('Mesurement & Control (M&C)','Mesurement & Control'));
        tiers.add(new SelectOption('Drilling & Surface (D&S)','Drilling & Surface'));
        tiers.add(new SelectOption('Subsea (SS)','Subsea'));
        */
    }
    
    public PageReference setTiers(){
        this.tier2=aPlan.GE_OG_Tier_2_P_L__c;
        this.tier3=aPlan.GE_OG_Tier_3_P_L__c;
        return null;
    }
    
}

Hi All,

 

As shown below the  execution of the process order is right  r not?if not so Please do the changes and let me know.

 

Validation

Apex class

Triggers

Workflows

 

Thanks

Hi,

If we have constructor in a class,Kindly let me know how can we write code to cover that constructor in test method?

 

Thanks ,

Eswar.

Hello,


I actually have two questions around apex code.

 

  1. Suppose I want to turn off or delete my apex class, how do I go about doing that in production?  I do not see a way to deactivate or delete the code?
  2. Prior to installing the DupeBlocker 2.0 application in the Sandbox my code was at 89% code coverage but after I installed the third party application it dropped to 23%!  I see that SFDC is using some of the DupBlocker code classes that are firing when I run my test script.  What will I do to get around this because once I install DupeBlock into production I will be faced with this kind of mishap all the time!!!

I've created a master-detail relationship field on a custom child object, looking to a custom parent object. When I create the child record, of course the master-parent record is required, and I'm then able to save the child record.

 

But once the child record has been saved, the master-detail lookup field to the parent record is now locked - I'm unable to edit the master-parent record, even though I had edit read-only field rights.

 

Any ideas would be great, thanks!

Hi,
 
Yesterday I had deployed aan apex trigger from sandbox to production env. The trigger is an "before insert, before update" to check for duplicate account names. The trigger works fine in prodiuction for preventing duplicate Account names.
 
But today when I tried to mass update Accounts for some other field using Apex Data Loader, I get the following error:
 

Apex script unhandled trigger exception by user/organization: 00530000000nHi3/00D300000006QZD

Trg_Account_Name_Dedup: execution of BeforeUpdate

caused by: System.Exception: Too many SOQL queries: 21

Trigger.Trg_Account_Name_Dedup: line 1, column 143

Can anyone please advise on how to disable triggers in production env so that I can carry out other mass updates in Account using Apex Data loader tool.

Thanks and regards,
Ambili