• kirran
  • NEWBIE
  • 30 Points
  • Member since 2010

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

Hi, I'm fairly new to Apex and I'm a little confused how the testing works. I have the following really small class but can't seem to figure out how to write the test to cover 75%. Can anyone help?

 

 

public class findSLCFamily { private final List<SLC__c> slcs; private final SLC__c currentSLC; public findSLCFamily() { currentSLC = [select Original_SLC__c from SLC__c where id = :ApexPages.currentPage().getParameters().get('id')]; slcs = [select Name, License_Order__c, Product__c, Devices__c, SUP_End_Date__c, Original_SLC__c from SLC__c where Original_SLC__c = :currentSLC.Original_SLC__c order by License_Order__c]; } public List<SLC__c> getSLCFamily() { return slcs; } }

 

 

  • March 10, 2010
  • Like
  • 0

hi...

 

i need to parse the content of attachment in apex class which is attached to a custom object..

Ex:template__c is a custom object.i attached ex1.docx to one record of this object..

 

 

now my problem is i need to display the content of ex1.doc in vf page with some changes..

for that i need parsing of ex1.doc..

 

please help me.

 

Thanks

 

  • March 26, 2010
  • Like
  • 0

Hi, I'm fairly new to Apex and I'm a little confused how the testing works. I have the following really small class but can't seem to figure out how to write the test to cover 75%. Can anyone help?

 

 

public class findSLCFamily { private final List<SLC__c> slcs; private final SLC__c currentSLC; public findSLCFamily() { currentSLC = [select Original_SLC__c from SLC__c where id = :ApexPages.currentPage().getParameters().get('id')]; slcs = [select Name, License_Order__c, Product__c, Devices__c, SUP_End_Date__c, Original_SLC__c from SLC__c where Original_SLC__c = :currentSLC.Original_SLC__c order by License_Order__c]; } public List<SLC__c> getSLCFamily() { return slcs; } }

 

 

  • March 10, 2010
  • Like
  • 0

I created a custom button for the Cases object called "New Warranty Case". It creates a new case using a particular Case record type. I'd like to create a Visualforce page with the standard Case controller that displays this new button instead of the standard New button to create a case (I want to remove the standard New button). Can I modify the buttons if I use a standard controller?

 

This is what I have so far:

 

<apex:page standardController="Case" tabStyle="Warranty_Cases__tab" >
        
  <apex:outputPanel style="margin-bottom: 5px" layout="block" >
      <apex:outputLink target="_top" value="/apex/Warranty_Cases?listId=00B70000006ptA8">Open Warranty Cases</apex:outputLink>
        &nbsp;|&nbsp;
      <apex:outputLink target="_top" value="/apex/Warranty_Cases?listId=00B70000006pt9f">Closed Warranty Cases</apex:outputLink>
        &nbsp;|&nbsp;
      <apex:outputLink target="_top" value="/apex/Warranty_Cases?listId=00B70000006pt9o">All Warranty Cases</apex:outputLink>
  </apex:outputPanel>

  <apex:outputPanel id="listContainer" layout="block">
        <apex:enhancedList listId="{!IF(ISNULL($Request.listId),'00B70000006pt9o',$Request.listId)}" customizable="false" height="300"/>
  </apex:outputPanel>
</apex:page>
									
Name
Version
Namespace
Type
Salesforce.com API17.0 Salesforce.com API

 
I have embedded the Scheduler Interface in my code , calling as a method from another class which bind with page e.g ABC.

On reloading the page “ABC” or performing the action that calls my main class , I am getting below exception. It shows somehow code does work but I am not able to see in “Schedule Jobs” under set up>>monitoring.

Hi.,

 

Have created MS word doc using Visual force (similar to standard Mail merge functionality).

 

Main Key is here,


<apex:page standardController="Order__c" recordSetVar="Order" showHeader="false" contentType="application/msword" extensions="Date_Update_ACL" action="{!update_date}">

 

The reason to move to custom functionality instead of using mail merge in Activity History, we need to generate mail merge doc for more than one record, upon generating the doc we need to update some fields in that record.

 

Here the problem is, our visual force page generate the MS Word doc in Fire Fox browser but not working in internet explorer.

 

I dont understand the reason, have you faced this kind of issue, any workaround for this? 

Any help appreciated.

 

Note: PDF can be generated easily but we need to generate in MS word