• Prachi
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 8
    Replies

 

Good day!

I have a table:

<Apex: DataTable value = "{! MyActGoalsDescList}" var = "GP" rowClasses = "odd, even" styleClass = "bhpb-act bhpb-base bot-margin row-highlight" columnsWidth = "100px, 500px, 150px, 150px , 150px ">
    
<apex:column style="text-align:" headervalue="{!$Label.Goal_set_in}">
    
<apex:outputText value="{0,date,MMMM','yyyy}">
    
<apex:param value="{!GT.CreatedDate}" />
</ Apex: outputText>
    
</ Apex: column>
<apex:column style="text-align:" headervalue="{!$Label.Due_Date}">
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
    
<apex:param value="{!GT.Targeted_Due_Date__c}" />
</ Apex: outputText>
</ Apex: column>
<apex:column style="text-align:" headervalue="{!$Label.Status}" value="{!GT.Status__c}" />
</ Apex: DataTable>

 



The source for this table:

public List<Action_Goal__c> MyActGoalsDescList
   {
      get
      {
          List<Action_Goal__c> MyActGoalsDescList = new List<Action_Goal__c>();
          if ((MyGoalType != null) && (MyGoalType !=''))
          {
//              Date MyDate = getStartDate();
              Map<id,Action_Goal__c> aMap = new Map<id,Action_Goal__c>(
                                 [select Goal_Description__c ,id, Goal_Type__c, Targeted_Due_Date__c, Name, Status__c, CreatedDate
                                    From Action_Goal__c
                                    Where ToLabel(Goal_Type__c) =:MyGoalType
                                       AND ((CALENDAR_Year(Targeted_Due_Date__c)= :MyYear AND CALENDAR_Month(Targeted_Due_Date__c)= :MyMonth)
                                            OR ( Status__c !=:BusinessPlanUtil.Completed ) )
                                       AND CreatedById =:MyUserID
                                  ]);
                
              if (aMap.isEmpty())
              {
                Action_Goal__c tmp = new Action_Goal__c();
                tmp.Goal_Description__c =' ';
                MyActGoalsDescList.add(tmp);
              }
              else
              {
                MyActGoalsDescList = aMap.values() ;
                MyActGoals= new List<MyActGoals__c> ();
                Set<id> whatIDSet = aMap.keySet() ;
                MyActGoals = getMyActGoalsList(whatIDSet);
              }
          }
         return MyActGoalsDescList;
    }
    set;
   }

How do I make sure that if MyActGoalsDescList empty table does not render?

 

 

 

Hi,

 

I want to deploy some components from a sandbox environment to another unrelated sandbox/production org.

I'm aware that this can be done using ANT tool.

I wanted to know if there are any constraints/dependencies that I need to take care of for such multi-org deployments.

 

Thanks

  • October 03, 2012
  • Like
  • 0

Hi,

 

I'm trying to search documents based on search text provided by user.

However, the search results contain some documents that do not contain the search text.

This happens in case of exact search too.

Can anybody help me regarding this.

This is the query in my class:

 

List<List<Document>> searchList = [FIND :searchText IN ALL FIELDS RETURNING Document];

 

searchText - searchString entered by user.

 

Thanks in advance.

  • September 07, 2012
  • Like
  • 0

Hi,

 

I have a custom button on a related list on my Account page. The button performs some action and after saving I'm redirected to the Account detail page.

I would like to know if there is any way to set the focus on the related list section on the detail page on redirecting.

 

Thanks

 

Hi,

 

Is there any way through which I can query/fetch validation rules and workflows related to an object in my apex class.

Thanks in Advance

Hi,

 

I'm using a Javascript plugin for displaying Calendar on my VF Page. The plugin is loaded as a Static Resource. I need to set a class variable in one of the methods in the plugin. Is this possible.

Thanks in Advance

Hi,

 

         When ever  opp stage  is closed Won then i want (type and some other picklist field) to read only in edit mode How can we achive this,is it possible in without using any code (or) using triggers ?

 

Good day!

I have a table:

<Apex: DataTable value = "{! MyActGoalsDescList}" var = "GP" rowClasses = "odd, even" styleClass = "bhpb-act bhpb-base bot-margin row-highlight" columnsWidth = "100px, 500px, 150px, 150px , 150px ">
    
<apex:column style="text-align:" headervalue="{!$Label.Goal_set_in}">
    
<apex:outputText value="{0,date,MMMM','yyyy}">
    
<apex:param value="{!GT.CreatedDate}" />
</ Apex: outputText>
    
</ Apex: column>
<apex:column style="text-align:" headervalue="{!$Label.Due_Date}">
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
    
<apex:param value="{!GT.Targeted_Due_Date__c}" />
</ Apex: outputText>
</ Apex: column>
<apex:column style="text-align:" headervalue="{!$Label.Status}" value="{!GT.Status__c}" />
</ Apex: DataTable>

 



The source for this table:

public List<Action_Goal__c> MyActGoalsDescList
   {
      get
      {
          List<Action_Goal__c> MyActGoalsDescList = new List<Action_Goal__c>();
          if ((MyGoalType != null) && (MyGoalType !=''))
          {
//              Date MyDate = getStartDate();
              Map<id,Action_Goal__c> aMap = new Map<id,Action_Goal__c>(
                                 [select Goal_Description__c ,id, Goal_Type__c, Targeted_Due_Date__c, Name, Status__c, CreatedDate
                                    From Action_Goal__c
                                    Where ToLabel(Goal_Type__c) =:MyGoalType
                                       AND ((CALENDAR_Year(Targeted_Due_Date__c)= :MyYear AND CALENDAR_Month(Targeted_Due_Date__c)= :MyMonth)
                                            OR ( Status__c !=:BusinessPlanUtil.Completed ) )
                                       AND CreatedById =:MyUserID
                                  ]);
                
              if (aMap.isEmpty())
              {
                Action_Goal__c tmp = new Action_Goal__c();
                tmp.Goal_Description__c =' ';
                MyActGoalsDescList.add(tmp);
              }
              else
              {
                MyActGoalsDescList = aMap.values() ;
                MyActGoals= new List<MyActGoals__c> ();
                Set<id> whatIDSet = aMap.keySet() ;
                MyActGoals = getMyActGoalsList(whatIDSet);
              }
          }
         return MyActGoalsDescList;
    }
    set;
   }

How do I make sure that if MyActGoalsDescList empty table does not render?

 

 

 

Hi, 

 

I have an objected called Helper__c. On my Case, there is a lookup field to this object. My goal is to update the three custom fields on the Helper__c object whenever a Helper record is selected. The custom fields are Total Number of Cases, Date of Last Case and Last Case Number. I wrote a trigger for this, but my the trigger is bulk-safe and I always get SOQL Query limit errors during mass updates. Please help me correect the following code:

 

Trigger:

 

trigger helperCases on Case (after insert, after update, after delete) {
    
    if(trigger.isUpdate || trigger.isInsert){
        for(Case c: trigger.new){
            if(c.helper__c == null){
                
            }else if(c.helper__c != null){
                testUpdate.testHelperUpdate(c.Helper__c);
            }
        }
    }if(trigger.isUpdate){
    	for(Case c : trigger.old){
            if(c.Helper__c == null){
    			
    	    }else if(c.Helper__c !=null){
    		testUpdate.testHelperUpdate(c.Helper__c);
    	    }
    	}
    }if(trigger.isDelete){
        for(Case c: trigger.old){
            if(c.Helper__c == null){
                
            }else if(c.Helper__c != null){
                testUpdate.testHelperUpdate(c.Helper__c);
            }
        }   
    }
}

 

Apex Class:

 

public class testUpdate{
     public static void testHelper(Id helperId){
        Double numberofCases;
        String cNum;
        LIST<CASE> c = [SELECT ID, CaseNumber, CreatedDate FROM CASE WHERE Helper__c =: helperID ORDER BY CaseNumber DESC];
        numberofCases = c.size();
        Helper__c helper = [SELECT ID,  all_cases__c, Last_case__c, Last_case_date__c FROM Helper__c WHERE ID =: HelperID];
        helper.all_cases__c = numberofCases;
        if(c.size()>0){
            cNum = c[0].ID;
            Helper.last_case__c = cNum;
            Helper.Last_case_date__c = c[0].CreatedDate;
        }else{
            Helper.last_case__c = null;
            Helper.Last_case_date__c = null;
        }
        update helper;

     }
}

 Thank you.

Hi,

 

I have a custom button on a related list on my Account page. The button performs some action and after saving I'm redirected to the Account detail page.

I would like to know if there is any way to set the focus on the related list section on the detail page on redirecting.

 

Thanks

 

Hi,

 

Is there any way through which I can query/fetch validation rules and workflows related to an object in my apex class.

Thanks in Advance

Hi,

 

I'm using a Javascript plugin for displaying Calendar on my VF Page. The plugin is loaded as a Static Resource. I need to set a class variable in one of the methods in the plugin. Is this possible.

Thanks in Advance

Hello all,

do you know if SF support in (parsing) XML that encoding in UTF-16.

 

the probem is that I send httpRequest and I received the xml but if I'm trying to display the content or just pars the xml an errror message raise "ParseError at [row,col]:[1,1]Message: Content is not allowed in prolog."

facts:
1.) I already trying to setHeader(before the http.send) to content-type,UTF-16 (;charset=utf-16).
2.) I'm trying to display the (getBody()) of the xml in visualforce page - and I recieved a lot weird charcters,
like question mark or something.

3.) all those problems not happened if the xml encoded in UTF-8.

4.) 

ErrorLog4 = ''; HttpRequest req = new HttpRequest(); req.setEndpoint(XML FILE PATH); req.setMethod('GET'); req.setHeader('Content-Type', 'text/xml'); Http http = new Http(); HTTPResponse res = http.send(req); String responseBody = res.getBody() ; Xmlstreamreader xmlreader = new Xmlstreamreader(responseBody) ; try { ErrorLog1 += responseBody ; // Weird Characters been displayed //ErrorLog3 += xmlreader.nextTag() ; // Error message }

 Thanks in advance,
Avi.


 

  • December 23, 2009
  • Like
  • 0