• Benajmin Pirih
  • 0 Points
  • Member since 2010

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 5
Is returning null in catch block is best practice..

String strOpportunityRecord;
        Opportunity sourceOpportunityRecord = new Opportunity();
        try {
            strOpportunityRecord =  'SELECT ' + Queriablefields +'Name From Opportunity where id =: sourceOpportunityId';
            if (strOpportunityRecord != null) {
                sourceOpportunityRecord = Database.query(strOpportunityRecord) ;
           return sourceOpportunityRecord;
        catch(QueryException ex) {
            return null;

HI all,

I'm trying to export Activity History records for Opportunity Object. I dont find Activity History object in Data Loader.

Any help would be greatly appreciated.


Thanks in Advance,


I would like to be able to open a contact record in SF and generate a custom Word letter to an individual contact using their SF address fields. It only seems that you can do this using templates and mass mail merges. The user in our group that needs this feature generates customized letters to individuals (vs. groups), so templates aren't practical. Any workarounds that reduce the number of steps to create a letter and store it in SF are welcome.

This should be very simple, but I've been unable to find any example documentation to get this working.


Any help would be extremely appreciated!


I simply want to pre-fill some fields when a user creates a new record. I have successfully accomplished this by creating a Custom Button with the following URL setup:



This Custom Button works great, except instead of a Custom Button, I want to Override the "New" standard button for the object with this same URL logic.


What would the equivalent code for my visualforce page look like?


I've even tried such things as:



<apex:page StandardController="Application__c" action="https://na5.salesforce.com/a0R/e?CF00N700000024t7L={!HTMLENCODE(Opportunity.Name)}&CF00N700000024t7L_lkid={!Opportunity.Id}&retURL=%{!Opportunity.Id}&CF00N700000025GKF={!$User.FirstName}&CF00N70000002525I={!Opportunity.Contact__c}&CF00N700000024tek={!Opportunity.Account}"/>




Additional details:


- This is a custom object called "Application" that I am trying to have some fields be "pre-filled" for.

- Generally, users currently click "New Application" standard button from an "Opportunity". I want to Override this "New Application" button with the above URL.


Any help would be greatly appreciated!


Thank you!!