• mcrosby
  • NEWBIE
  • 215 Points
  • Member since 2007

  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 47
    Replies

I'm having an issue when formating currency in Apex.

 

I have this method in my VF extension:

public String getPrice(){
     List<String> formatter= new String[]{'0','number','###,###,##0.00'};
     String priceT = String.format(this.aux.Total_Price__c.format(), formatter);
     return priceT; 
}

The Total_Price__c field is currency type from a custom object.

I set the variable output to the VF page with:

<apex:pageBlockSectionItem >
    <apex:outputLabel value="Total Price"/>
    <apex:outputText value="{!price}"/>
</apex:pageBlockSectionItem>

 

My problem is that if the price has only zeros in decimal places it shows the number as an integer (no decimals at all), also if the price has more than 2 decimals the output shows all of them.

 

I want to always show 2 decimals no matter what.  

 

Hello - I've been banging my head too long on this one.  I'm trying to show a shadowbox of the claim activity when user clicks on the outputlink.  When I click on link nothing happens.  I've noticed that when I hover over the outputlink for a given claim the path shown in IE8 (lower left hand corner) looks something like

 

javascript&colon;showClaim(&#34;/a1NRxxxxxxxxxxxx&#34;,%20&#34;B-000008%20Quick%20View&#34;);

 

It should show up as

 

javascript&colon;showClaim("a1NRxxxxxxxxxxxx", "B-000008 Quick View");

 

The quot is for some reason getting passed as ascii....or so it seems.

 

Please share any thoughts and/or ideas.  Thank you!

 

function showClaim(src, title) {

 

     var box = new parent.SimpleDialog("hersh"+Math.random(), true);

     parent.box = box;

     box.setTitle(title);

     box.createDialog();

     box.setWidth(850);

     src='<a href=\"#\" onclick=\"box.hide();\">Close</a><br/><br/><p><iframe src="' + src + '" style="border:0; width:810px; min-height:           600px"></iframe></p>'

     box.setContentInnerHTML(src);

     box.setupDefaultButtons();

      box.show();

    if( 0 > 0 )

    setTimeout("box.hide();",0);

}

 

Here is my outputpannel

 

<

apex:outputpanelid="DuplicateClaimTable">

     <apex:pageblocksectiontitle="Possible Duplicate Claims"columns="1"rendered="{!dupeClaimToggle}">

          <apex:pageBlockTablevalue="{!dupeClaimList}"var="dupeClaim"style="width:100%">

               <apex:columnstyle="background-color:yellow">

                    <apex:facetname="header">

                                Claim Name

                     </apex:facet>

                                  {!dupeClaim.Name}

                </apex:column>

                <apex:columnstyle="background-color:yellow">

                     <apex:facetname="header">

                                 View claim

                     </apex:facet>

                         <apex:outputLinkvalue="javascript&colon;showClaim(&quot;/{!dupeClaim.Id}&quot;, &quot;{!dupeClaim.Name} Quick View&quot;);"title="View Claim">View Claim</apex:outputLink>

                </apex:column>

           </apex:pageBlockTable>

      </apex:pageblocksection>

</apex:outputpanel>

 

  • March 11, 2013
  • Like
  • 0

Hi All,

I'm having trouble debugging the following line, which is highlighted in code below: 

consCourseCodeMapBig.get(Con.Id).keySet()

for some reason the first value in the set is Null, and the second value is the value I'm expecting to receive. I have confirmed this by testing in UI with the system.assert that you see in the red highlighed section. That system assert returns the following:

Error:

courseRoleTrigger: execution of AfterInsert caused by: System.AssertException: Assertion Failed: Youre here {null, a0FZ0000001sjSzMAI} Class.contactToCourseCodeHandler.saveLogic: line 83, column 1 Class.contactToCourseCodeHandler.newCourseRoleHandler: line 10, column 1 Trigger.courseRoleTrigger: line 20, column 1

 

 

 

I didn't even think it was possible to have a null value in a keySet, and not sure where in my code it would be happening. The section highlighted in blue is where the map is being built. I have used system.asserts there,too and do not find null value there.

 

 

Thanks for any help!

 

 

 

public with sharing class contactToCourseCodeHandler {
    public static void newCourseRoleHandler(Set<Id> newCRs) {
        
        Map<Id,Map<Id,courseCodeWrapper>> contactToCourseCodeBig = createBigCCWMap(newCRS, 'cRole');
        Map<Id,courseCodeWrapper> contactToCourseCodeLittle = createLittleCCWMap(newCRS, 'cRole');
            
        if(!contactToCourseCodeBig.isEmpty()) {
            String reqType = 'Insert/Update';
            String source = 'Course';
            saveLogic(contactToCourseCodeBig,contactToCourseCodeLittle, reqType, source);
        }
    }
    
    public static void deletedCourseRoleHandler(Set<Id> deletedCRs) {
        
        map<Id,Map<Id,courseCodeWrapper>> contactToCourseCodeBig = createBigCCWMap(deletedCRs, 'cRole');        
        map<Id,courseCodeWrapper> contactToCourseCodeLittle = createLittleCCWMap(deletedCRs, 'cRole');
        
        if(!contactToCourseCodeBig.isEmpty()) {
            String reqType = 'Delete';
            String source = 'Course';
            saveLogic(contactToCourseCodeBig,contactToCourseCodeLittle, reqType, source);
        }
    }
    
    public static void updatedCourseRoleHandler() {
    }
    
    public static void evalItemHandler(Set<Id> evalItems) {
   
	    map<Id,Map<Id,courseCodeWrapper>> contactToCourseCodeBig = createBigCCWMap(evalItems, 'eval');
	    map<Id,courseCodeWrapper> contactToCourseCodeLittle = createLittleCCWMap(evalItems, 'eval');
	   
	    if(!contactToCourseCodeBig.isEmpty()) {
	    String reqType = 'Insert/Update';
	    String source = 'Eval';
	    saveLogic(contactToCourseCodeBig,contactToCourseCodeLittle, reqType, source);
	    }
    }
    
    public static void deletedEvalItemHandler(Set<Id> deletedEvalItems) {
   
	    map<Id,Map<Id,courseCodeWrapper>> contactToCourseCodeBig = createBigCCWMap(deletedEvalItems, 'eval');
	    map<Id,courseCodeWrapper> contactToCourseCodeLittle = createLittleCCWMap(deletedEvalItems, 'eval');
	   
	    if(!contactToCourseCodeBig.isEmpty()) {
		    String reqType = 'Delete';
		    String source = 'Eval';
		    saveLogic(contactToCourseCodeBig,contactToCourseCodeLittle, reqType, source);
	    }
   
    }
    
    public static void deletedEvalHandler(Set<Id> evals) {    
   
	    Set<Id> evalItems = new Set<Id>();
	   
	    for(Comp_Item__c ei : [select ID from Comp_Item__c where  Comp__c IN :evals]) {
	    	evalItems.add(ei.Id);
	    }	   
	   
	    map<Id,Map<Id,courseCodeWrapper>> contactToCourseCodeBig = createBigCCWMap(evalItems, 'eval');
	    map<Id,courseCodeWrapper> contactToCourseCodeLittle = createLittleCCWMap(evalItems, 'eval');
	   
	   
	    if(!contactToCourseCodeBig.isEmpty()) {
		    String reqType = 'Delete';
		    String source = 'Eval';
		    saveLogic(contactToCourseCodeBig,contactToCourseCodeLittle, reqType, source);
		}
   
    }    
    
    
    public static void saveLogic(Map<Id,Map<Id,courseCodeWrapper>> consCourseCodeMapBig, Map<Id,courseCodeWrapper> consCourseCodeMapLittle, String triggerType, String source) {
        
        List<Contact_Course_Code__c> ccdUpsert = new List<Contact_Course_Code__c>();
        List<Contact_Course_Code__c> ccdDelete = new List<Contact_Course_Code__c>();
        
        if(triggerType == 'Insert/Update') {
        	for(Contact Con : [Select Id, Course_Code_Count__c, (Select Id, Contact__c, Course_Code__c, CourseRoleCount__c, EvalCount__c from Contact_Course_Code__r) from Contact where Id IN :consCourseCodeMapBig.keySet()]) {
        		if(Con.Course_Code_Count__c == 0) {
        		   for(Id cccId : consCourseCodeMapBig.get(Con.Id).keySet()) { system.assert(false,'Youre here '+consCourseCodeMapBig.get(Con.Id).keySet());
	        			Contact_Course_Code__c newCCC = new Contact_Course_Code__c(
	        				Contact__c = Con.Id,
	        				Course_Code__c = cccId,
	        				CourseRoleCount__c = source == 'Course' ? consCourseCodeMapLittle.get(Con.Id).theCount : 0,
	        				EvalCount__c = source == 'Eval' ? consCourseCodeMapLittle.get(Con.Id).theCount : 0        				
	        			);
        			ccdUpsert.add(newCCC);
        			}
        		}else{
        			for(Contact_Course_Code__c existingCCC : Con.Contact_Course_Code__r) {
        				if(consCourseCodeMapBig.get(Con.Id).containsKey(existingCCC.Course_Code__c)) {
        					existingCCC.CourseRoleCount__c += source == 'Course' ? consCourseCodeMapBig.get(Con.Id).get(existingCCC.Course_Code__c).theCount : 0;
        					existingCCC.EvalCount__c += source == 'Eval' ? consCourseCodeMapBig.get(Con.Id).get(existingCCC.Course_Code__c).theCount : 0;
        					ccdUpsert.add(existingCCC);
        				}       				
        			}
        		}
        	}
        } if(null != ccdUpsert) { 
        	upsert ccdUpsert;
        }
            
       /*if(triggerType == 'Delete') {            
                        
            for(Contact con : [Select Id,Name, Course_Code_Count__c, (Select Id, Contact__c, Course_Code__c, CourseRoleCount__c, Current__c, Primary__c,Total_Association_Count__c,EvalCount__c from Contact_Course_Code__r) from Contact where Id IN: consCourseCodeMapBig.keySet()]) {                
                if(con.Course_Code_Count__c > 0) {
                    for(courseCodeWrapper cdWrap : consCourseCodeMap.get(con.Id) ) {                        
                        for(Contact_Course_Code__c existingCCC1 : Con.Contact_Course_Code__r) {
                            if(conCourseCodeMapBig.get(Con.Id).containsKey(existingCCC1.Course_Code__c)) {                                
                                if(existingCCC1.Total_Association_Count__c > 1) {
                                    existingCCC1.CourseRoleCount__c -= source == 'Course' ? conCourseCodeMapBig.get(Con.Id).get(existingCCC1.Course_Code__c).theCount : 0;  
                                    existingCCC1.EvalCount__c -= source == 'Eval' ? conCourseCodeMapBig.get(Con.Id).get(existingCCC1.Course_Code__c).the : 0;
                                    ccdUpsert.add(existingCCC1);
                                }else{
                                    ccdDelete.add(existingCCC1);
                                }
                            }
                        }
                    }
                    if(ccdUpdate.size() > 0) {
                    update conCourseCodesUpdate.values();
                    }
                    if(ccdDelete.size() > 0) {
                        delete conCourseCodesDel.values();
                    }
                }
            }
        } */   
    }
    
    //uses the triggered CourseRoles to map the Contact Id to CourseCodes...course codes in wrapper class.
    public static Map<Id,Map<Id,courseCodeWrapper>> createBigCCWMap(Set<Id> IDs, String source) {
        
        Map<Id,Map<Id,courseCodeWrapper>> bigMap = new Map<Id,Map<Id,courseCodeWrapper>>();
        Map<Id,courseCodeWrapper> littleMap = new Map<Id,courseCodeWrapper>();
        
        if(source == 'cRole') {                    
          
           for(aggregateResult cr1 : [select Contact__c, Course__r.ACE_Code_4__c,  Count(Id) from Course_Role__c where Id IN: IDs AND Course__r.ACE_Code_4__c != null AND Contact__c != null Group By Rollup (Contact__c,Course__r.ACE_Code_4__c)]) {                
               
               courseCodeWrapper wrappedCourse = new courseCodeWrapper(String.valueOf(cr1.get('Contact__c')),String.valueOf(cr1.get('ACE_Code_4__c')),Integer.valueOf(cr1.get('expr0')),source);
               littleMap.put(wrappedCourse.courseCodeId,wrappedCourse);
               bigMap.put(String.valueOf(cr1.get('Contact__c')),littleMap);
           }           
       
        }  else {
        	for(aggregateResult ei : [select Contact__c,Product__r.ACE_Code_4__c,  Count(Id) from Comp_Item__c where Id IN: Ids AND Product__r.ACE_Code_4__c != null and Contact__c != null Group By Rollup (Contact__c,Product__r.ACE_Code_4__c)]) {
        		
        		courseCodeWrapper wrappedEval = new courseCodeWrapper(String.valueOf(ei.get('Contact__c')), String.valueOf(ei.get('ACE_Code_4__c')), Integer.valueOf(ei.get('expr0')),source);
        		littleMap.put(wrappedEval.courseCodeId,wrappedEval);
        		bigMap.put(String.valueOf(ei.get('Contact__c')),littleMap);
        	} 
        }
		return bigMap; 
    }  
    
    public static Map<Id,courseCodeWrapper> createLittleCCWMap(Set<Id> IDs, String source) {
    	
    	Map<Id,courseCodeWrapper> littleMap = new Map<Id,courseCodeWrapper>();
        
        if(source == 'cRole') {                    
          
           for(aggregateResult cr1 : [select Contact__c, Course__r.ACE_Code_4__c,  Count(Id) from Course_Role__c where Id IN: IDs AND Course__r.ACE_Code_4__c != null AND Contact__c != null Group By Rollup (Contact__c,Course__r.ACE_Code_4__c)]) {                
               
               courseCodeWrapper wrappedCourse = new courseCodeWrapper(String.valueOf(cr1.get('Contact__c')),String.valueOf(cr1.get('ACE_Code_4__c')),Integer.valueOf(cr1.get('expr0')),source);
               littleMap.put(String.valueOf(cr1.get('Contact__c')),wrappedCourse);
           }           
       
        }  else {
        	for(aggregateResult ei : [select Contact__c,Product__r.ACE_Code_4__c,  Count(Id) from Comp_Item__c where Id IN: Ids AND Product__r.ACE_Code_4__c != null and Contact__c != null Group By Rollup (Contact__c,Product__r.ACE_Code_4__c)]) {
        		
        		courseCodeWrapper wrappedEval = new courseCodeWrapper(String.valueOf(ei.get('Contact__c')), String.valueOf(ei.get('ACE_Code_4__c')), Integer.valueOf(ei.get('expr0')),source);
        		littleMap.put(String.valueOf(ei.get('Contact__c')),wrappedEval);
        	} 
        }
		return littleMap; 
    }
    
    public class courseCodeWrapper {
        public Id contactId {get; set;}
        public Id courseCodeId {get; set;}        
        public Integer theCount {get; set;}
        public String source {get; set;}
        
        public courseCodeWrapper(Id conId, Id ccId, Integer elCount,  String wCDSource ) {
            contactId = conId; 
            courseCodeId = ccId;           
            theCount = elCount;
            source = wCDSource;
        }        
    } 
}

 

Hi,

 

I am struggling with what I guess should be simple - please help!

 

I want to add the colored bar (with the icon on it) to a VF page, and ideally inherit the color and icon from another tab.  Easy??

 

In the simplest form here is what I am doing - but whatever I try I can't get the bar with icon to appear (the colors are inherited but the bar is not there).

 

Am I missing something?  Is there an <apex> tag to use etc?

 

<apex:page standardController="Contact" showheader="true" tabStyle="Opportunity" > <!-- Begin Default Content REMOVE THIS --> <h1>Congratulations</h1> This is your new Page: tabstyle_test <!-- End Default Content REMOVE THIS --> </apex:page>

 

 

Thanks

Demi

  • November 13, 2009
  • Like
  • 0

Hi,

 

I'm new to salesforce development. I'm trying to look at the data we have in salesforce and figure out how it is currently organized (the developer who set it up is no longer employed at my organization). I'd like to be able to access the database directly preferable through a command-line interface. Is there a way to do that? Any pointers or suggestions would be much appreciated. 

 

Thanks in advance,

 

Shirley 

Hi all,

 

Is it possible to add an outputLink as a column within a table? If so, how can this be achieved?

Thanks in advance.

I have the following trigger that I call from my test class. All it does is check if a "sales allocation" and opportunity have the same value for a "state" field and if so set a field on the opportunity equal to a field on the sales allocation.

 

If I uncomment the system.assertnotequals the trigger throws a runtime exception (that is expected behaviour.)

 

 

trigger OpportunityTechAssociation on Opportunity (before insert, before update) { for(Opportunity opp : trigger.new){ if(opp.Project_State__c <> null){ List<Sales_Allocation__c> sale=[Select ID, Technician_Approval__c, State_Code__c from Sales_Allocation__c where State_Code__c =:opp.Project_State__c limit 1];

 

if(sale.size() > 0){ opp.Technical_Association__c=sale.get(0).Technician_Approval__c;

 

//System.assertNotEquals(opp.Technical_Association__c,sale.get(0).Technician_Approval__c,'they are equal'); } } } }

 


However, I have a system.assertequals in the test code below that tests the same things (opportunity tech association field and sales allocation tech approval field) but causes the test to fail.

 

What is going on in my test that is causing the two system asserts to give different results?

 

 

static testMethod void OpportunityTest() { Sales_Allocation__c sale = new Sales_Allocation__c(Name='test sale',State_Code__c='CA'); sale.Technician_Approval__c = UserInfo.getUserId(); insert sale; Account acc = new Account(Name='Test',Type='Contractor'); acc.billingstate = 'CA'; insert acc; Date myDate = date.newinstance(1988, 4, 23); Opportunity opp = new Opportunity(); opp.Name = 'test'; opp.Account = acc; opp.CloseDate = myDate; opp.StageName = 'Project is Real'; opp.Project_City__c = 'testcity'; opp.Project_State__c = 'CA'; opp.Access_to_Repair__c = 'Yes'; opp.Below_Grade__c = 'No'; opp.Below_Water_Table__c = 'No'; Test.startTest(); insert opp; System.AssertEquals(sale.Technician_Approval__c,opp.Technical_Association__c); Test.stopTest(); }

 


 

I am writing an auditing tool that takes an incoming URL (Example:  https://instance.salesforce.com/apex/CustomAuditTool?url=...) and would like to report if the user accessed a "tab", "view" or "edit" page for an object based on the URL passed in to a controller.  This is relatively easy if the URL follows the standard pattern of ".../{Prefix}/o", ".../{ID}" or ".../{ID}/e", however, our org uses custom Visualforce pages to handle the display and editing of records (e.g. ".../apex/AccountCustomTab", ".../apex/AccountCustomView?id={ID}" and ".../apex/AccountCustomEdit?id={ID}").

 

Is there a way, given an sObject, to determine if the standard links for that object have been overridden by Visualforce pages?  I've looked at DescribeSObjectResult but that doesn't seem to provide what I need.

 

Ideally I'd like to retrieve the URL for the Visualforce page of overridden links.  Example:  Account "View" link is overridden by "/apex/AccountCustomView".  Or, is there a way that I can get a map of Visualforce pages that override standard links?

 

 

 

I have created a custom Calendar page that is supposed to display event entries for the designated month/year for all users in my org (user count is about 30).  In my custom controller, I have the following SOQL:

Pseudo-Code:
Date sDate = {start date};
Date eDate = {end date};

events = [SELECT id, subject, description, location, activitydate, activitydatetime,
durationinminutes, isalldayevent, owner.name FROM Event WHERE activitydate >= :sDate AND activityDate <= :eDate ORDER BY activitydate, activitydatetime];

If I open the page as an Admin user, I retrieve all events for the date range for all users (as expected).  However, when logged in as a regular user and the page is first loaded, only the respective user's events are returned.

I would chalk this up as a permissions issue, but something odd happens when the user clicks on an apex:commandLink that changes the month in the controller.  When the link is clicked, all events for the date range for all users are returned.  It's almost as if the user needs to navigate to the next or previous month and then back to the current month in order for all events to show properly.

I have added System.debug statements to the code to verify that when the user initially opens the page, the event count reflects the number of events for that particular user for the current month.  However, when they navigate to a different month, the count reflects events for all users in the selected month.

Can someone explain why this would happen?


  • September 09, 2008
  • Like
  • 0
I have created a few custom components for the home page and was wondering if there is an easy way to hide the name of the component when it is displayed?  It appears that SFDC takes the name of the custom component and puts it in a h2 tag. 

I'm thinking I can write some JavaScript to locate the specific h2 tags I want to hide (clearing out the innerHTML) and embed that in the "Messages and Alerts" component, but I wanted to see if there was a better way to accomplish this.  Any suggestions?
Can someone explain to me what purpose the "isdtp" URL parameter serves?  I stumbled across it in the discussion forum awhile ago while looking for a way to display a record without the SFDC header and navigator panes.

The reason I ask is that I noticed that if you append "isdtp=mn" to the URL for a record, there are some extra icons next to the help icon for emailing, printing, and customizing the page.  These action icons appear to be helpful and was wondering why they aren't included in the standard layout for a record.
Is there a way to have the Data Loader (9.0) export records that have been marked for deletion (moved to the recycle bin)?
I have a batch Data Loader process that I want to create that should extract Event records from Salesforce based on the last run date of the process.  I have read through the Data Loader documentation and see that you can use @process.lastRunDate@ in the SQL Configuration, but how would I do something similar using SOQL?

When I attempt to use something like 'SELECT Id, Subject, ... FROM Event WHERE CreatedDate > @process.lastRunDate@' in the sfdc.extractionSOQL property, it throws a MalformedQueryFault error at the @ symbol.

Any recommendations on how I can write a SOQL statement for the batch process so that only records created after the last run date are retrieved?

I am trying to find out if there is a way to develop a custom report for a custom object I've created that includes data from the owner's (user) record?

Each user in my organization has been identified in their user record as belonging to a particular office.  Everyone has the ability to create a custom object that we have developed.

What I would like to do is create a custom report that categories the custom objects by the owner's office location.

For example:

London Office
   - Record1
   - Record2
   - Record3
DC Office
   - Record4
   - Record5

Is this possible out of the box, or do I need to develop some code that populates the custom object with the owner's office location?
I am trying to come up with a way to retrieve all Accounts within a hierarchy based on a supplied Id.  So, if the Id of the parent account is provided, all children records plus the parent record should be returned.  Similarly, if an Id of a child record is supplied, all parent, sibling, and children records should be returned.

Is there an easy way to accomplish this without sending multiple SOQL statements?
I am attempting to write a custom application for my organization that allows for a Time Off approval process.  I am trying to create a trigger that will create an Event record for a user if their Time Off request has been approved.

I developed the trigger in my sandbox, and everything seems to work properly.  However, I'm trying to work my way through deploying it to production and I'm running into a problem.

When I run the compileAndTest Ant script, I'm getting the following error:

System.DmlException: Update failed. First exception on row 0 with id a0FT0000000Arq8MAC; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, createTimeOffEvents: execution of AfterUpdate

caused by: System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id

Trigger.createTimeOffEvents: line 108, column 13

I believe the reason for this error is because I am attempting to set the OwnerId of the Event to a selected user id that is specified in the custom Time Off object.

Is there a way to allow triggers to set the OwnerId of a new record?
  • September 06, 2007
  • Like
  • 0

I'm writing a trigger that updates two fields in a custom object leverages a Related Account lookup field to populate two other lookups for the Parent account and Ultimate Parent account.  The Related Account Id already exists in the data fed by survey information received through ClickTools, but the trigger's job is to populate Parent account and Ultimate Parent account.  The point is, I need to populate Parent account with the first parent it finds and  then the Ultimate parent at the top of the list.  It seems to me that the only way I can effectively do this is by counting the number of parent accounts up the hierarchy from the account receiving the data, so here is my issue:

 

I've seen a number of examples for counting child accounts, but what I'm wanting to do is count the number of accounts above an account all the way to the top of the tree.  Here's an example:

 

  • Account 1
    • Account 2
      • Account 3
        • Account 4
        • Account 5
          • Account 7
        • Account 6

I want to know that, for Account 7, there are three parents above it.  I also want to obtain the ID and Type from each Parent above it.

 

This being said, I want to be able to do this in a variable situation, whether it's 2 or 10 layers deep.  Any ideas?

 

 

I would like to know if it is possible to have different visualforce pages in different tabs. Is it possible to do what I am trying to do? I know it can be done with component by referencing the component like

 

<c:componentName />

 Can it be odne with VF pages?

 

<form>
<div>
<apex:pageBlock >
			<apex:pageBlockButtons >
				<apex:commandButton value="Save" id="save" />
				<apex:commandButton value="Cancel" id="Cancel" />
			</apex:pageBlockButtons>
			<apex:tabPanel selectedTab="t1" id="panel" switchType="client" 
				tabClass="activeTab" inactiveTabClass="inactiveTab">
				<apex:tab name="tab1" id="tab1" label="label">
					<div class="tab" > 
					  <!--  This is where call to page will go -->
					</div>
				</apex:tab>
				<apex:tab name="tab2" id="tab2" label="label">
						<div class="cTab" > 
				        	<!--  This is where call to page will go -->
						</div>
				</apex:tab>
				<apex:tab name="tab3" id="tab3" label="label">
					<div class="tab" > 
						<!--  This is where call to page will go -->
					</div>	
				</apex:tab>
			</apex:tabPanel>
		</apex:pageBlock>
 </div>
</apex:form>

 

  • September 23, 2013
  • Like
  • 0

I'm having an issue when formating currency in Apex.

 

I have this method in my VF extension:

public String getPrice(){
     List<String> formatter= new String[]{'0','number','###,###,##0.00'};
     String priceT = String.format(this.aux.Total_Price__c.format(), formatter);
     return priceT; 
}

The Total_Price__c field is currency type from a custom object.

I set the variable output to the VF page with:

<apex:pageBlockSectionItem >
    <apex:outputLabel value="Total Price"/>
    <apex:outputText value="{!price}"/>
</apex:pageBlockSectionItem>

 

My problem is that if the price has only zeros in decimal places it shows the number as an integer (no decimals at all), also if the price has more than 2 decimals the output shows all of them.

 

I want to always show 2 decimals no matter what.  

 

Hello - I've been banging my head too long on this one.  I'm trying to show a shadowbox of the claim activity when user clicks on the outputlink.  When I click on link nothing happens.  I've noticed that when I hover over the outputlink for a given claim the path shown in IE8 (lower left hand corner) looks something like

 

javascript&colon;showClaim(&#34;/a1NRxxxxxxxxxxxx&#34;,%20&#34;B-000008%20Quick%20View&#34;);

 

It should show up as

 

javascript&colon;showClaim("a1NRxxxxxxxxxxxx", "B-000008 Quick View");

 

The quot is for some reason getting passed as ascii....or so it seems.

 

Please share any thoughts and/or ideas.  Thank you!

 

function showClaim(src, title) {

 

     var box = new parent.SimpleDialog("hersh"+Math.random(), true);

     parent.box = box;

     box.setTitle(title);

     box.createDialog();

     box.setWidth(850);

     src='<a href=\"#\" onclick=\"box.hide();\">Close</a><br/><br/><p><iframe src="' + src + '" style="border:0; width:810px; min-height:           600px"></iframe></p>'

     box.setContentInnerHTML(src);

     box.setupDefaultButtons();

      box.show();

    if( 0 > 0 )

    setTimeout("box.hide();",0);

}

 

Here is my outputpannel

 

<

apex:outputpanelid="DuplicateClaimTable">

     <apex:pageblocksectiontitle="Possible Duplicate Claims"columns="1"rendered="{!dupeClaimToggle}">

          <apex:pageBlockTablevalue="{!dupeClaimList}"var="dupeClaim"style="width:100%">

               <apex:columnstyle="background-color:yellow">

                    <apex:facetname="header">

                                Claim Name

                     </apex:facet>

                                  {!dupeClaim.Name}

                </apex:column>

                <apex:columnstyle="background-color:yellow">

                     <apex:facetname="header">

                                 View claim

                     </apex:facet>

                         <apex:outputLinkvalue="javascript&colon;showClaim(&quot;/{!dupeClaim.Id}&quot;, &quot;{!dupeClaim.Name} Quick View&quot;);"title="View Claim">View Claim</apex:outputLink>

                </apex:column>

           </apex:pageBlockTable>

      </apex:pageblocksection>

</apex:outputpanel>

 

  • March 11, 2013
  • Like
  • 0

I have a VF Component that I need to include in a tabbed page - the name of the tab refers to the attribute I'm passing to the component to determine which record I want displayed in the panel.  

 

My component controller has a getter and setter for the component attribute and has a getter for the record but no data is being passed back unless I hard code the attribute value in the controller. 

 

Here is the controller: 

public class fcrCompetencyController{

  public Competency__c comp{get;set;}
  public String compType{get;set;}
  
  public fcrCompetencyController(){
      comp=[SELECT id, Description__c, Competency_Type__c, Name 
                      FROM Competency__c 
                      WHERE Active__c = True];
   }
 
  public Competency__c getComp() {
    return comp;
  } 
 
  public void setCompType(String s){
      compType = s;
      }
        
  public String getCompType(){
      return compType;
      }

}

 And my component is: 

<apex:component controller="fcrCompetencyController">
    <apex:attribute name="competency" assignTo="{!compType}" type="String" description="Compentency Displayed"/>
    <apex:outputField value="{!comp.Name}"/>
    <apex:outputField value="{!comp.Description__c}"/>
</apex:component>

 

This is the test page I'm using to try to get it displayed, the actual page is much longer: 

<apex:page controller="fcrCompetencyController">
<apex:pageBlock title="{!comp}">
<apex:outputText value="comptype is {!compType}"/>
<c:competencyDisplay competency="Pre/Post Call Analysis"/>
</apex:pageBlock>
</apex:page>

 I'm not sure where to go next, every example I can find and all the documentation I've found it seems I have everything covered, but am unable to get this working. 

 

I need to display the Description__c field as a field, not text as it is a rich text field on the object and needs to be displayed as created. 

 

Any ideas?

 

Thanks!

i want to show the standardview from visualforcepage using custom button.....any examples....

Hi All,

I'm having trouble debugging the following line, which is highlighted in code below: 

consCourseCodeMapBig.get(Con.Id).keySet()

for some reason the first value in the set is Null, and the second value is the value I'm expecting to receive. I have confirmed this by testing in UI with the system.assert that you see in the red highlighed section. That system assert returns the following:

Error:

courseRoleTrigger: execution of AfterInsert caused by: System.AssertException: Assertion Failed: Youre here {null, a0FZ0000001sjSzMAI} Class.contactToCourseCodeHandler.saveLogic: line 83, column 1 Class.contactToCourseCodeHandler.newCourseRoleHandler: line 10, column 1 Trigger.courseRoleTrigger: line 20, column 1

 

 

 

I didn't even think it was possible to have a null value in a keySet, and not sure where in my code it would be happening. The section highlighted in blue is where the map is being built. I have used system.asserts there,too and do not find null value there.

 

 

Thanks for any help!

 

 

 

public with sharing class contactToCourseCodeHandler {
    public static void newCourseRoleHandler(Set<Id> newCRs) {
        
        Map<Id,Map<Id,courseCodeWrapper>> contactToCourseCodeBig = createBigCCWMap(newCRS, 'cRole');
        Map<Id,courseCodeWrapper> contactToCourseCodeLittle = createLittleCCWMap(newCRS, 'cRole');
            
        if(!contactToCourseCodeBig.isEmpty()) {
            String reqType = 'Insert/Update';
            String source = 'Course';
            saveLogic(contactToCourseCodeBig,contactToCourseCodeLittle, reqType, source);
        }
    }
    
    public static void deletedCourseRoleHandler(Set<Id> deletedCRs) {
        
        map<Id,Map<Id,courseCodeWrapper>> contactToCourseCodeBig = createBigCCWMap(deletedCRs, 'cRole');        
        map<Id,courseCodeWrapper> contactToCourseCodeLittle = createLittleCCWMap(deletedCRs, 'cRole');
        
        if(!contactToCourseCodeBig.isEmpty()) {
            String reqType = 'Delete';
            String source = 'Course';
            saveLogic(contactToCourseCodeBig,contactToCourseCodeLittle, reqType, source);
        }
    }
    
    public static void updatedCourseRoleHandler() {
    }
    
    public static void evalItemHandler(Set<Id> evalItems) {
   
	    map<Id,Map<Id,courseCodeWrapper>> contactToCourseCodeBig = createBigCCWMap(evalItems, 'eval');
	    map<Id,courseCodeWrapper> contactToCourseCodeLittle = createLittleCCWMap(evalItems, 'eval');
	   
	    if(!contactToCourseCodeBig.isEmpty()) {
	    String reqType = 'Insert/Update';
	    String source = 'Eval';
	    saveLogic(contactToCourseCodeBig,contactToCourseCodeLittle, reqType, source);
	    }
    }
    
    public static void deletedEvalItemHandler(Set<Id> deletedEvalItems) {
   
	    map<Id,Map<Id,courseCodeWrapper>> contactToCourseCodeBig = createBigCCWMap(deletedEvalItems, 'eval');
	    map<Id,courseCodeWrapper> contactToCourseCodeLittle = createLittleCCWMap(deletedEvalItems, 'eval');
	   
	    if(!contactToCourseCodeBig.isEmpty()) {
		    String reqType = 'Delete';
		    String source = 'Eval';
		    saveLogic(contactToCourseCodeBig,contactToCourseCodeLittle, reqType, source);
	    }
   
    }
    
    public static void deletedEvalHandler(Set<Id> evals) {    
   
	    Set<Id> evalItems = new Set<Id>();
	   
	    for(Comp_Item__c ei : [select ID from Comp_Item__c where  Comp__c IN :evals]) {
	    	evalItems.add(ei.Id);
	    }	   
	   
	    map<Id,Map<Id,courseCodeWrapper>> contactToCourseCodeBig = createBigCCWMap(evalItems, 'eval');
	    map<Id,courseCodeWrapper> contactToCourseCodeLittle = createLittleCCWMap(evalItems, 'eval');
	   
	   
	    if(!contactToCourseCodeBig.isEmpty()) {
		    String reqType = 'Delete';
		    String source = 'Eval';
		    saveLogic(contactToCourseCodeBig,contactToCourseCodeLittle, reqType, source);
		}
   
    }    
    
    
    public static void saveLogic(Map<Id,Map<Id,courseCodeWrapper>> consCourseCodeMapBig, Map<Id,courseCodeWrapper> consCourseCodeMapLittle, String triggerType, String source) {
        
        List<Contact_Course_Code__c> ccdUpsert = new List<Contact_Course_Code__c>();
        List<Contact_Course_Code__c> ccdDelete = new List<Contact_Course_Code__c>();
        
        if(triggerType == 'Insert/Update') {
        	for(Contact Con : [Select Id, Course_Code_Count__c, (Select Id, Contact__c, Course_Code__c, CourseRoleCount__c, EvalCount__c from Contact_Course_Code__r) from Contact where Id IN :consCourseCodeMapBig.keySet()]) {
        		if(Con.Course_Code_Count__c == 0) {
        		   for(Id cccId : consCourseCodeMapBig.get(Con.Id).keySet()) { system.assert(false,'Youre here '+consCourseCodeMapBig.get(Con.Id).keySet());
	        			Contact_Course_Code__c newCCC = new Contact_Course_Code__c(
	        				Contact__c = Con.Id,
	        				Course_Code__c = cccId,
	        				CourseRoleCount__c = source == 'Course' ? consCourseCodeMapLittle.get(Con.Id).theCount : 0,
	        				EvalCount__c = source == 'Eval' ? consCourseCodeMapLittle.get(Con.Id).theCount : 0        				
	        			);
        			ccdUpsert.add(newCCC);
        			}
        		}else{
        			for(Contact_Course_Code__c existingCCC : Con.Contact_Course_Code__r) {
        				if(consCourseCodeMapBig.get(Con.Id).containsKey(existingCCC.Course_Code__c)) {
        					existingCCC.CourseRoleCount__c += source == 'Course' ? consCourseCodeMapBig.get(Con.Id).get(existingCCC.Course_Code__c).theCount : 0;
        					existingCCC.EvalCount__c += source == 'Eval' ? consCourseCodeMapBig.get(Con.Id).get(existingCCC.Course_Code__c).theCount : 0;
        					ccdUpsert.add(existingCCC);
        				}       				
        			}
        		}
        	}
        } if(null != ccdUpsert) { 
        	upsert ccdUpsert;
        }
            
       /*if(triggerType == 'Delete') {            
                        
            for(Contact con : [Select Id,Name, Course_Code_Count__c, (Select Id, Contact__c, Course_Code__c, CourseRoleCount__c, Current__c, Primary__c,Total_Association_Count__c,EvalCount__c from Contact_Course_Code__r) from Contact where Id IN: consCourseCodeMapBig.keySet()]) {                
                if(con.Course_Code_Count__c > 0) {
                    for(courseCodeWrapper cdWrap : consCourseCodeMap.get(con.Id) ) {                        
                        for(Contact_Course_Code__c existingCCC1 : Con.Contact_Course_Code__r) {
                            if(conCourseCodeMapBig.get(Con.Id).containsKey(existingCCC1.Course_Code__c)) {                                
                                if(existingCCC1.Total_Association_Count__c > 1) {
                                    existingCCC1.CourseRoleCount__c -= source == 'Course' ? conCourseCodeMapBig.get(Con.Id).get(existingCCC1.Course_Code__c).theCount : 0;  
                                    existingCCC1.EvalCount__c -= source == 'Eval' ? conCourseCodeMapBig.get(Con.Id).get(existingCCC1.Course_Code__c).the : 0;
                                    ccdUpsert.add(existingCCC1);
                                }else{
                                    ccdDelete.add(existingCCC1);
                                }
                            }
                        }
                    }
                    if(ccdUpdate.size() > 0) {
                    update conCourseCodesUpdate.values();
                    }
                    if(ccdDelete.size() > 0) {
                        delete conCourseCodesDel.values();
                    }
                }
            }
        } */   
    }
    
    //uses the triggered CourseRoles to map the Contact Id to CourseCodes...course codes in wrapper class.
    public static Map<Id,Map<Id,courseCodeWrapper>> createBigCCWMap(Set<Id> IDs, String source) {
        
        Map<Id,Map<Id,courseCodeWrapper>> bigMap = new Map<Id,Map<Id,courseCodeWrapper>>();
        Map<Id,courseCodeWrapper> littleMap = new Map<Id,courseCodeWrapper>();
        
        if(source == 'cRole') {                    
          
           for(aggregateResult cr1 : [select Contact__c, Course__r.ACE_Code_4__c,  Count(Id) from Course_Role__c where Id IN: IDs AND Course__r.ACE_Code_4__c != null AND Contact__c != null Group By Rollup (Contact__c,Course__r.ACE_Code_4__c)]) {                
               
               courseCodeWrapper wrappedCourse = new courseCodeWrapper(String.valueOf(cr1.get('Contact__c')),String.valueOf(cr1.get('ACE_Code_4__c')),Integer.valueOf(cr1.get('expr0')),source);
               littleMap.put(wrappedCourse.courseCodeId,wrappedCourse);
               bigMap.put(String.valueOf(cr1.get('Contact__c')),littleMap);
           }           
       
        }  else {
        	for(aggregateResult ei : [select Contact__c,Product__r.ACE_Code_4__c,  Count(Id) from Comp_Item__c where Id IN: Ids AND Product__r.ACE_Code_4__c != null and Contact__c != null Group By Rollup (Contact__c,Product__r.ACE_Code_4__c)]) {
        		
        		courseCodeWrapper wrappedEval = new courseCodeWrapper(String.valueOf(ei.get('Contact__c')), String.valueOf(ei.get('ACE_Code_4__c')), Integer.valueOf(ei.get('expr0')),source);
        		littleMap.put(wrappedEval.courseCodeId,wrappedEval);
        		bigMap.put(String.valueOf(ei.get('Contact__c')),littleMap);
        	} 
        }
		return bigMap; 
    }  
    
    public static Map<Id,courseCodeWrapper> createLittleCCWMap(Set<Id> IDs, String source) {
    	
    	Map<Id,courseCodeWrapper> littleMap = new Map<Id,courseCodeWrapper>();
        
        if(source == 'cRole') {                    
          
           for(aggregateResult cr1 : [select Contact__c, Course__r.ACE_Code_4__c,  Count(Id) from Course_Role__c where Id IN: IDs AND Course__r.ACE_Code_4__c != null AND Contact__c != null Group By Rollup (Contact__c,Course__r.ACE_Code_4__c)]) {                
               
               courseCodeWrapper wrappedCourse = new courseCodeWrapper(String.valueOf(cr1.get('Contact__c')),String.valueOf(cr1.get('ACE_Code_4__c')),Integer.valueOf(cr1.get('expr0')),source);
               littleMap.put(String.valueOf(cr1.get('Contact__c')),wrappedCourse);
           }           
       
        }  else {
        	for(aggregateResult ei : [select Contact__c,Product__r.ACE_Code_4__c,  Count(Id) from Comp_Item__c where Id IN: Ids AND Product__r.ACE_Code_4__c != null and Contact__c != null Group By Rollup (Contact__c,Product__r.ACE_Code_4__c)]) {
        		
        		courseCodeWrapper wrappedEval = new courseCodeWrapper(String.valueOf(ei.get('Contact__c')), String.valueOf(ei.get('ACE_Code_4__c')), Integer.valueOf(ei.get('expr0')),source);
        		littleMap.put(String.valueOf(ei.get('Contact__c')),wrappedEval);
        	} 
        }
		return littleMap; 
    }
    
    public class courseCodeWrapper {
        public Id contactId {get; set;}
        public Id courseCodeId {get; set;}        
        public Integer theCount {get; set;}
        public String source {get; set;}
        
        public courseCodeWrapper(Id conId, Id ccId, Integer elCount,  String wCDSource ) {
            contactId = conId; 
            courseCodeId = ccId;           
            theCount = elCount;
            source = wCDSource;
        }        
    } 
}

 

Hello,

I am not able to save my components or refresh my components from Server via Eclipse IDE for Force.com after I updated to Winter 12. I always get Connection Timeout exception. 

 

java.net.SocketTimeoutException: connect timed out
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(Unknown Source)
	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
	at sun.net.NetworkClient.doConnect(Unknown Source)
	at sun.net.www.http.HttpClient.openServer(Unknown Source)
	at sun.net.www.http.HttpClient.openServer(Unknown Source)
	at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
	at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
	at com.sforce.ws.transport.JdkHttpTransport.connectRaw(JdkHttpTransport.java:133)
	at com.sforce.ws.transport.JdkHttpTransport.connectLocal(JdkHttpTransport.java:97)
	at com.sforce.ws.transport.JdkHttpTransport.connectLocal(JdkHttpTransport.java:92)
	at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.java:88)
	at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:94)
	at com.sforce.soap.metadata.MetadataConnection.describeMetadata(MetadataConnection.java:345)
	at com.salesforce.ide.core.remote.MetadataStubExt.describeMetadata(MetadataStubExt.java:303)
	at com.salesforce.ide.core.remote.MetadataStubExt.describeMetadata(MetadataStubExt.java:311)
	at com.salesforce.ide.core.remote.MetadataStubExt$$FastClassByCGLIB$$9404e285.invoke(<generated>)
	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
	at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77)
	at com.salesforce.ide.core.internal.aspects.MetadataOperationsRetryAspect.metadataOperationsRetry(MetadataOperationsRetryAspect.java:22)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
	at com.salesforce.ide.core.remote.MetadataStubExt$$EnhancerByCGLIB$$c1ac1f9d.describeMetadata(<generated>)
	at com.salesforce.ide.core.services.MetadataService.getDescribeMetadata(MetadataService.java:54)
	at com.salesforce.ide.core.services.PackageDeployService.adjustDeployOptions(PackageDeployService.java:300)
	at com.salesforce.ide.core.services.PackageDeployService.deployWork(PackageDeployService.java:264)
	at com.salesforce.ide.core.services.PackageDeployService.deploy(PackageDeployService.java:144)
	at com.salesforce.ide.core.services.PackageDeployService.deploy(PackageDeployService.java:127)
	at com.salesforce.ide.core.services.PackageDeployService.deploy(PackageDeployService.java:111)
	at com.salesforce.ide.ui.actions.SaveToServerActionController.deploy(SaveToServerActionController.java:132)
	at com.salesforce.ide.ui.actions.SaveToServerActionController.saveResourcesToServer(SaveToServerActionController.java:114)
	at com.salesforce.ide.ui.actions.SaveToServerAction$1.execute(SaveToServerAction.java:63)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

 Please let me know if anyone has the similar problem.

 

i am running WIndows 7 professional, Eclipse Indigo R1 and have latest Force.com IDE plugin available.

 

 

Guys,

 

I'm farily new to the API. I am successfully inserting data into our tables, but one of the tables requires a contact, so I'm wondering how I get the ID of the contact by a provided email address?

 

Example:


SforceService.Storage_Work_Order__c soh = new SforceService.Storage_Work_Order__c();

soh.Order_Date__c = new DateTime(2011, 9, 12);

soh.Order_Date__c = DateTime.Today;

 

// Get ID of requesting customer by provided email address.

 

soh.Requesting_Customer__r.Id = ????

^^^^^

 

I assume I'd need to build a contact object based on the result of the email address search and pass that object to the customer_r.id field. Does anyone have an example?

 

 

 

 

 

 

 

hey guys, i get this error all of the sudden.

"System.VisualforceException: core.apexpages.exceptions.ApexPagesGenericException:

Class.GenerateAttachEmailCertificate_WS.GenerateAttachEmailCertificate: line 10, column 18
Class.GenerateAttachEmailCertificate_WS.testingEmail: line 93, column 14
External entry point".

 

line 9 and 10:

 

PageReference pdf = new PageReference('/apex/CertificatePrintToPdf?id=' + id); Blob pdfBody = pdf.getContent();

 

and line 93 is inside my test method:

 

testSend = GenerateAttachEmailCertificate_WS.GenerateAttachEmailCertificate(testId, testVer, testLoc);

 

im pretty sure it was 100% coverage, but now im in the middle of deploying a new class into production, and i got that error.

 

can anyone help me please?

thanks in advance.

 

 

 

 

 

Hello,

 

I'm getting an error today when trying to save APEX changes in Eclipse:  

 

"Save error: Unable to perform save on all files: PermGen space".

 

Is this a problem in my workspace, or in the SF Org I am developing in?

 

Thank you

I'm looking to pull a list of values that are used in a particular field in our sf.com data.  Is there any function or command that will pull only one of each value?

 

Also, Is there any books out there on soql?  The closest thing I have is the force.com cookbook.

 

Thanks!