• AKall
  • NEWBIE
  • 75 Points
  • Member since 2008

  • Chatter
    Feed
  • 3
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 33
    Questions
  • 41
    Replies

Hello,

 

I'm new at developing in salesforce.com , so I'm having a little trubble to finding out some things.

 

First of all, I would like to write a trigger for the Opportunity. I want to create automatically a new task, when ever a user creates a new Opportunity.

 

trigger createTask on Opportunity (before insert, before update){

        List<Task> task = new List<Task>();
        
        for (Integer i = 0; i < Trigger.new.size(); i++) {
        
            task.add(new Task(
                         whatid=Trigger.new[i].Id,
                         OwnerId=Trigger.new[i].OwnerId,
                         Subject='First Contact '
                   ) ) ;

        }
        
        insert task;

}
 

My idea for this trigger, is to create a task for each new Opportunity created. Is it right?

thanks!

 

 

 

Message Edited by majo on 10-16-2009 08:52 AM
Message Edited by majo on 10-16-2009 08:53 AM
  • October 15, 2009
  • Like
  • 0

Hi All,

I am trying to figure out how to create a time field. I've looked through the existing posts, and had a quick look through the AppExchange and google's open source projects, but haven't found anything yet. Does anybody know how to create a time field?

  • November 06, 2009
  • Like
  • 0

Hi All,

In the code below I am using the system.assertS to show me which parts of my code are being run. Somehow, the first one is displayed proving that the criteria specified in the if statement is being met, but strangely enough when I comment out the first assert and run the code again the second assert is not being displayed, which indicates that it is not going through the for loop that is controlled by the if statement. I am pretty new to writing code, therefore my debug skills aren't that strong, but this makes absolutely no sense to me. How could it enter the if statement, but not the for loop?

 

 

if(Null != this.selectedTeam) { //system.assert(false,'you made it this far '+this.selectedTeam); for(MeetCompetitors__c M1 : [select ID, Name, Meet__c from MeetCompetitors__c where CompetingTeam__c = :this.selectedTeam]) { system.assert(false,'These are your meets '+M1.Meet__c); filteredMeets.add(M1.Meet__c); }

 

 

 

  • November 02, 2009
  • Like
  • 0

Hi all,

I'm trying to figure out a partial refresh. The first selectList is working fine. Upon making a selection there I want the page to reRender to show another selectList based on what was chosen. I have the controller and the page built up to this point but for the life of me cannot get the page to reRender. I gave up on trying to reRender the second selectList and just tried to get the page to reRender by using a timestamp as proof. This is version that I have posted below. What is it that is stopping it from reRendering?

<apex:page Controller="eventLineUPController" id="thePage"> <apex:form > <apex:pageBlock id="thePageBlock"> <apex:pageBlockSection title="Event Line Up Wizard" columns="1" collapsible="false" id="teamSelectSection" columns="1"> <apex:pageBlockSectionItem > <apex:outputPanel > <apex:actionRegion id="AR1"> <apex:selectList id="teamList" value="{!selectedTeam}" size="1"> <apex:selectOptions value="{!TeamOptions}"/> <actionSupport event="onchange" rerender="tester" status="status1"/> </apex:selectList> <apex:actionStatus startText="Processing..."for="AR1" id="status1"/> </apex:actionRegion> </apex:outputPanel> </apex:pageBlockSectionItem> <apex:outputPanel id="tester"> {!text(now())} </apex:outputPanel> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>

 

 

 

  • October 25, 2009
  • Like
  • 0

I have created a visual force page that contains two tables. One of the tables is a child of the other. To be more specific the parent table is a list of Contracts, and the child table is a list of approval steps associated with that contract. I would really like to make the child table render only when a particular field is mousedover in the parent table.I haven't figured it out yet. Does anybody see where I'm going wrong?

 

 

<apex:pageBlockTable value="{!Contracts}" var="Cons" columns="4"> <apex:facet name="header"></apex:facet> <apex:column > <apex:facet name="header">Contract Name</apex:facet> <apex:outputLink value="https://cs2.salesforce.com/apex/xTPLicensingContract?id={!Cons.ID}">{!Cons.Name} <apex:actionSupport event="onmouseover" reRender="thePage:lcLinx:subTable"/> </apex:outputLink> </apex:column> <apex:column > <apex:facet name="header">Product Summary</apex:facet> <apex:outputText value="{!Cons.ProductSummary__c}"/> </apex:column> <apex:column > <apex:facet name="header">Approval Status</apex:facet> <apex:outputText value="{!Cons.CurrentApprovalStatusFull__c}"/> </apex:column> <apex:column > <apex:facet name="header">Date of Last Step Taken</apex:facet> <apex:outPutText value="{0,date,MM-dd-yyyy}"> <apex:param value="{!Cons.DateofLastStep__c}"/> </apex:outPutText> </apex:column> <apex:column breakBefore="true" colspan="4" > <apex:outputPanel id="subTable"> <apex:dataTable value="{!Cons.ApprovalSteps__r}" var="s" width="100%" border="10px"> <apex:column > <apex:outputLink value="https://cs2.salesforce.com/{!s.ID}">{!s.Step__r.Name}</apex:outputLink> </apex:column> <apex:column > {!s.Status__c} </apex:column> <apex:column > <apex:outPutText value="{0,date,MM-dd-yyyy}"> <apex:param value="{!s.Date__c}"/> </apex:outPutText> </apex:column> <apex:column > {!s.Approver__r.Name} </apex:column> </apex:dataTable> </apex:outputPanel> </apex:column>

 

 

 

  • June 03, 2009
  • Like
  • 0

I have created a trigger that sends a Visual Force email template. There are basically two cases that cause the trigger to fire and send the email. In one case everything works fine. In the second case the email is sent but arrives blank. The two cases are as follows:

 

The email works fine for this case:

1: When an opportunity is updated to a certain stage or higher and has an OpportunityProduct of a specific type. (We use a custom OpportunityProduct__c object). Phrased in our internal terms...when an eBooks opportunity is updated from a stage below 80% to be 80% or higher.

 

The email arrives blank for this case:

2. When an opportunity is inserted at 80% or higher and is then assigned the specific product type(in this case ebooks)

 

I have done some debugging, and the result has been greater confusion. In particular, I used a systemAssert to verify that the send email method that I pass the Opportunity to from the trigger actually exists just before the line that sends the email. The opportunity is there in both cases. I then used the same systemAssert to verify that the email has all of the required parameters. All of the parameters are there in both cases, and they are all the same. So why wouldn't the emails arrive the same?

 

 

marcRecordAlert on Opportunity (after update) { for(ID opptyID : Trigger.newMap.keySet()) { Opportunity oppty = [select id, Name, Probability, ProductSummary__c, StageName, RecordType.Name, Owner.BusinessChannel__c from Opportunity where ID =:opptyID]; if(null!=oppty.ProductSummary__c) { if(((oppty.Probability>=80) && (oppty.ProductSummary__c.Contains('eBooks Collection')) && (oppty.Owner.BusinessChannel__c == 'Licensing Sales') ) &&( (null == Trigger.oldMap.get(opptyID).ProductSummary__c) ||(Trigger.oldMap.get(opptyID).ProductSummary__c.Contains('eBooks Collection')==false) ||(Trigger.oldMap.get(opptyId).Probability<80) ) ){ Opportunity_Handler OH = new Opportunity_Handler(); OH.marcRecordAlert(oppty); } } } }

 

public void marcRecordAlert(Opportunity oppty) { Messaging.SingleEmailMessage marcEmail = new Messaging.SingleEmailMessage(); Emailtemplate et = [select id from Emailtemplate Where Name='MARC Records Alert' AND TemplateType='visualforce' Limit 1]; marcEmail.setTemplateID(et.ID); User soa = [select ID, email from User Where Name='SOA']; marcEmail.setTargetObjectID(soa.ID); marcEmail.setWhatID(oppty.ID); //marcEmail.setToAddresses(new String[] {soa.email}); marcEmail.setCcAddresses(new String[]{'andy.kallio@Springer.com'}); marcEmail.setReplyTo('soa@springer.com'); marcEmail.setSenderDisplayName('Sales Operations Americas'); marcEmail.setSaveAsActivity(false); //System.assert(false,'This is the marcEmail'+marcEmail); try {

Messaging.sendEmail(new Messaging.SingleEmailMessage[] { marcEmail }); } catch (Exception me){ System.assert(false,'Send email failed with this error: '+me); } }

 


   

<messaging:emailTemplate subject="MARC Records Alert" recipientType="User" relatedToType="Opportunity"> <messaging:htmlEmailBody > <html> <body> <p>Greetings:</p> <p><em>{!relatedTo.Account.Name}</em> has just accepted a proposal for the following products.</p> <p>Please contact <em>{!relatedTo.Contact__r.Name}</em> at <em>{!relatedTo.Contact__r.Email}</em> to make sure they have the appropriate MARC records</p> <p>If there is no contact information then please contact the owner of this Opportunity: <em>{!relatedTo.Owner.Name}</em>.</p> <apex:datatable cellpadding="5" var="prods" value="{!relatedTo.Products__r}"> <apex:column value="{!prods.lc_Product__r.Name}" headerValue="Product Name"/> <apex:column value="{!prods.lc_Product__r.PriceListYear__c}" headerValue="Price List Year"/> </apex:datatable> You can review the full Opportunity details by following this link: <a href="https://emea.salesforce.com/{!relatedTo.ID}" id="theLink">https://emea.salesforce.com/{!relatedTo.ID}</a> </body> </html> </messaging:htmlEmailBody> </messaging:emailTemplate>

 


 

 

  • April 29, 2009
  • Like
  • 0
Can anybody tell me what the required parameters for a Single Email Message are (Messaging.SingleEmailMessage)? I am trying to debug a trigger that sends one that we have created that uses a Visual Force email template. My test method continuously fails because according to the debug log a Parameter value is null.
  • April 23, 2009
  • Like
  • 0

I want to get the context user of a page for which I am writing a controller because I want the page to appear one way for a certain type of user and another for a different type of user.

 

This is an example of what I had in mind.

 

String showForm = ($User.Role.Name = 'License Control') ;

 

There seems to be something wrong with my syntax, and I am having trouble finding a solution in the documentation. 

 

 

  • March 27, 2009
  • Like
  • 1
I am in the midst of an org merge project, and have come to the point where I need to migrate OpportunityOverride data and LineItemOverride data. According to the schema browser in the IDE these two objects are not creatable, which would explain why they are not available for insert, upsert or update in the data loader. Is there anybody that knows of a workaround, or can offer any advice?
  • March 06, 2009
  • Like
  • 0

Does anybody know of a way to migrate listviews on Standard objects? I'm not sure what to do now that I have discovered that there is no meta-data for listviews on standard objects.

 

 

  • February 20, 2009
  • Like
  • 0

Hello,

I'm a beginner that wrote a simple email handler class that invokes another class. I am having a hard time getting my test class to work. I have pasted both below. Thanks for any suggestions.

 

The email Handler:

 

global class licIDReqCatcher implements Messaging.InboundEmailHandler{
   
    /*This class receives emails pertaining to License ID requests that are
      are forwarded from the SOA inbox, and creates a task for SOA to begin
      contract tracking in salesforce.com.
    */
   
    global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope) {
        Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();
       
     //run process
         ID rec = null;  
        SalesOPS_Handler.createTask(email.subject.trim(),email.plainTextBody,rec);
                    
        return result;
    }       
}

 

The Test:

 

public class licIDReqCatcherTest {
   
    public static testMethod void test_licIDReqCatcher(){
       
        System.debug('Im starting a method');
       
        // Create a new email, envelope object and Attachment
        Messaging.InboundEmail email = new Messaging.InboundEmail();
        Messaging.InboundEnvelope env = new Messaging.InboundEnvelope();
       
        email.subject = 'test';
        email.plainTextBody = 'Hello, this a test email body. for testing purposes only. Bye';
        env.fromAddress = 'user@acme.com';


        // setup controller object
        licIDReqCatcher catcher = new licIDReqCatcher();
        catcher.handleInboundEmail(email, env);
   
    }
}

  • February 17, 2009
  • Like
  • 0

I am confused by the color coding of the payload for deployments that overwrite existing objects. These are given one of two colors Grey or Yellow. Can anybody tell me what the difference between these two colors indicates.I know this is probably very easy to learn in Eclipse online help, but I can't seem to get access to it, which is another issue I have been trying to resolve today.

  • February 05, 2009
  • Like
  • 0
I would like to upload data from one csv file to two different objects at the same time. I am pretty sure that this is not possible with the data loader. Does anybody know if it is possible with the Workbench?
  • January 24, 2009
  • Like
  • 0
We are experiencing a problem with governor limits where a trigger we have created results in the following error.
 
Validation Errors While Saving Record(s)
There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Apex trigger OpportunityCampaignUpdate caused an unexpected exception, contact your administrator: OpportunityCampaignUpdate: execution of AfterUpdate caused by: System.Exception: Too many query rows: 1001: Trigger.OpportunityCampaignUpdate: line 17, column 36".
 
There is really no way that this trigger could be acting on more than two records at a time, and it is absolutely impossible that it would be acting on more than 50 records at a time. The error occurs when we invoke the trigger from only one record. So we are curious to know if there is an internal trigger on the campaign object that is causing the error.
Code:
trigger OpportunityCampaignUpdate on Opportunity (after insert, after update) {
 
 /* Synchronizes opportunity approval with Campaign member response history */

 MAP<ID,LIST<ID>> cmids = new MAP<ID,LIST<ID>>{};
 for(Opportunity o: Trigger.New){
  if(o.WebTrialApproved__c == true){
   if (cmids.containskey(o.CampaignId)){
    cmids.get(o.CampaignId).add(o.Contact__r.Id);
   } else {
    cmids.put(o.CampaignId,new LIST<ID>{o.Contact__r.Id});
   }
  }
 }
 if (cmids.size()>0){
  for (ID c: cmids.keyset()){ 
   ID[] ccmids = cmids.get(c);
   CampaignMember[] cms = [Select ID, Status From CampaignMember Where (ContactID IN :ccmids OR Lead.ConvertedContactID IN :ccmids) AND CampaignId = :c];
   for(CampaignMember cm:cms){
    cm.Status = 'Trial Activated';
   }
   update cms;
  }
 }

}

 
  • January 16, 2009
  • Like
  • 0
I have encountered a strange problem with a visualforce email template. When I preview the template everything seems to be fine. It appears as I expect in the preview window of the salesforce interface, and the test emails that I send to myself via the 'Preview' button arrive without a problem. However, when the approval process rule triggers the email to be sent the only thing that my users are receiving is an email with the subject only...the body of the email is completely blank! I have yet to figure out why this is, so if anybody has any suggestions I would be very grateful.
Code:
<messaging:emailTemplate subject="New Web-to-Trial Request requires your Approval" recipientType="User" relatedToType="Opportunity">
<messaging:htmlEmailBody >
   <html>
     <body>
    
    <style type="text/css">
      p.regular {font-family: arial; size: 8pt;}
      p.small {font-family: arial; size 8pt; line-height: 100%}
    </style>  
    <p class="regular">
    <br>A New Trial Request has been submitted.</br>
    <br>Account: <apex:outputLabel >{!relatedTo.Account.Name}</apex:outputLabel></br>
    <br><apex:outputText >Requested By: {!relatedTo.Contact__r.Name}</apex:outputText></br> 
     <br>To approve, simply type 'Approved' in your response. You can also review the Opportunity or Approve online at https://emea.salesforce.com/{!relatedTo.Id}</br>
     </p>
     </body>
   </html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

 


Message Edited by AKall on 01-16-2009 01:26 PM
  • January 16, 2009
  • Like
  • 0
Hello,
I have created a tabbed detail page for a custom object that basically follows the example for a tabbed Account page in the latest cookbook. I am experiencing a problem with the default tab. It contains the details of the controller object and two related lists. When a record is first opened the details appear as expected, however after viewing a different tab and then returning to the default tab only the related lists appear, and the details of the record are missing. The tab in question has the label "Licensing Contracts". Can anybody see what the problems is?

Code:
<apex:page standardController="ContractPlus__c" showHeader="true" tabStyle="ContractPlus__c">
    <apex:tabPanel selectedTab="contractPlus" id="contractPlusTabs">
        <apex:tab label="Licensing Contracts" name="contractPlus" id="contractDetails">
            <apex:detail title="true" relatedList="false"/>
            <apex:relatedList subject="{!ContractPlus__c}" list="ContractParticipants__r"/>
            <apex:relatedList subject="{!ContractPlus__c}" list="SubContracts__r"/>
        </apex:tab> 
        <apex:tab label="Document Tracking">
            <apex:relatedList subject="{!ContractPlus__c}" list="ApprovalSteps__r"/>
            <apex:relatedList subject="{!ContractPlus__c}" list="Files__r"/>
        </apex:tab> 
        <apex:tab label="Terms, Products and Invoicing"> 
            <apex:relatedList subject="{!ContractPlus__c}" list="ContractProducts__r"/>
            <apex:relatedList subject="{!ContractPlus__c}" list="ContractTerms__r"/> 
            <apex:relatedList subject="{!ContractPlus__c}" list="InvoiceRequests__r"/>
        </apex:tab> 
        <apex:tab label="History and Activity">
            <apex:relatedList subject="{!ContractPlus__c}" list="NotesAndAttachments"/>
            <apex:relatedList subject="{!ContractPlus__c}" list="OpenActivities"/> 
            <apex:relatedList subject="{!ContractPlus__c}" list="ActivityHistories"/> 
        </apex:tab>               
    </apex:tabPanel>          
</apex:page>

 

  • November 13, 2008
  • Like
  • 0
We created a VF page that provided links to all areas of the app that were most commonly used. Two of the links have recently stopped working(I suspect it has something to do with Winter 09.) The two links that stopped working are the first two, which are for 'Home' and 'Console'. The other links are working fine. Can anybody see what the problem is. I get the 'URL No Longer Exists' error.
Code:
<apex:pageBlockSection title="General" columns="3">
            <apex:outputLink value="/home/home.jsp&retUrl=/apex/SLMQuickLinks">Home</apex:outputLink>
            <apex:outputLink value="/ui/desktop/DesktopPage&retUrl=/apex/SLMQuickLinks">Console</apex:outputLink>
            <apex:outputLabel ></apex:outputLabel>
            <apex:outputLink value="/00U/c—cType=1&retUrl=/apex/SLMQuickLinks">Calendar</apex:outputLink>
            <apex:outputLink value="/007–fcf=00B20000003gAZQ&retUrl=/apex/SLMQuickLinks">Activities</apex:outputLink>
            <apex:outputLink value="/007˜fcf=00B20000003gAZR&retUrl=/apex/SLMQuickLinks">Tasks</apex:outputLink>           
        </apex:pageBlockSection>

 

  • October 27, 2008
  • Like
  • 0
I am trying to create a substring that will be varying lengths. So, how can I get the end index of the substring to be the first space?
I have tried the following:
String signature = signedby[1].substring(0); This returns everything after the split.
String signature = signedby[1].substring(0).trim(); This returns everything after the split.

The only way I can get the substring to terminate is to create a concrete end index for example .substring(0,15) which means I will lose any charaters that are greater than 15. I need the substring to be able to adapt to any string length and end where the first space occurs.
  • October 23, 2008
  • Like
  • 0
  • October 22, 2008
  • Like
  • 0
I am having difficulty with two sections of code that are posted below. They are both from the same inbound email handler class.

The first section is meant to reformat a date in a Fedex tracking email to the SF format yyyy-mm-dd. My test emails fail...I get the following message in the failure notice email 'Invalid Integer: 10' The date appears in the email as this '10/06/2008'. The error is clearly because of the month. I have highlighted and underlined where the error is occuring.

Code:
String[] prepDate = emailBody.split('This shipment is scheduled to be sent on',0);
String[] sDate = prepDate[1].substring(0,10).split('/');
Datetime shipDate = datetime.newInstance(Integer.valueOf(sDate[2]),Integer.valueOf(sDate[0]),Integer.valueOf(sDate[1]));
Date myshipDate = date.valueOf(sDate[2]+'-'+sDate[0]+'-'+sDate[1]);

MailedPackage__c MP = [Select ID, TrackingNumber__c, Mailed__c, SignedBy__c, Test_Field__c, Delivered__c FROM MailedPackage__c Where Mailed__c = :myshipDate ];


My second problem occurs a little further down the page where I try take the traking # from the email and update the Tracking # field in SF.  The field does update, but I can never get any value other than a solid line whose length I can change based on the value I put in the substring limit.

Code:
MailedPackage__c MP = [Select ID, TrackingNumber__c, Mailed__c, SignedBy__c, Test_Field__c, Delivered__c FROM MailedPackage__c  Where Mailed__c = :myshipDate ];
  
  
 
 
 
     //retrieves tracking number from email and passes it to Tracking Number field  
     String[] prepTrack = emailBody.split('Tracking Number:',0);
     String TrackingNum = prepTrack[0].substring(0,12);
     MP.TrackingNumber__c = TrackingNum;
     update MP;

 

 

  • October 21, 2008
  • Like
  • 0
It seems that Winter 09 handles ret url differently. I am having trouble with the return url in two of my VF pages now that Winter 09 has gone live. Has anybody else had problems?
  • October 14, 2008
  • Like
  • 0

I want to get the context user of a page for which I am writing a controller because I want the page to appear one way for a certain type of user and another for a different type of user.

 

This is an example of what I had in mind.

 

String showForm = ($User.Role.Name = 'License Control') ;

 

There seems to be something wrong with my syntax, and I am having trouble finding a solution in the documentation. 

 

 

  • March 27, 2009
  • Like
  • 1

I am trying to do a nested SOQL statement. I want to have a query that I order by descending to find the biggest number and then use that number to only find the records with that number. So one part of the nested query will find the largest number and then I will use that number to show only the records that have number.

 

 

I can find the value with this query

 

 

Select Height__c 

from Person__c

Order By Height__c desc limit 1 

 

Just wondering if i can get this value to compare the rest of the records and display the results thanks. 

 

Thanks  

Message Edited by intern2424 on 11-02-2009 07:36 AM

Hi all,

I'm trying to figure out a partial refresh. The first selectList is working fine. Upon making a selection there I want the page to reRender to show another selectList based on what was chosen. I have the controller and the page built up to this point but for the life of me cannot get the page to reRender. I gave up on trying to reRender the second selectList and just tried to get the page to reRender by using a timestamp as proof. This is version that I have posted below. What is it that is stopping it from reRendering?

<apex:page Controller="eventLineUPController" id="thePage"> <apex:form > <apex:pageBlock id="thePageBlock"> <apex:pageBlockSection title="Event Line Up Wizard" columns="1" collapsible="false" id="teamSelectSection" columns="1"> <apex:pageBlockSectionItem > <apex:outputPanel > <apex:actionRegion id="AR1"> <apex:selectList id="teamList" value="{!selectedTeam}" size="1"> <apex:selectOptions value="{!TeamOptions}"/> <actionSupport event="onchange" rerender="tester" status="status1"/> </apex:selectList> <apex:actionStatus startText="Processing..."for="AR1" id="status1"/> </apex:actionRegion> </apex:outputPanel> </apex:pageBlockSectionItem> <apex:outputPanel id="tester"> {!text(now())} </apex:outputPanel> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>

 

 

 

  • October 25, 2009
  • Like
  • 0

Hello,

 

I'm new at developing in salesforce.com , so I'm having a little trubble to finding out some things.

 

First of all, I would like to write a trigger for the Opportunity. I want to create automatically a new task, when ever a user creates a new Opportunity.

 

trigger createTask on Opportunity (before insert, before update){

        List<Task> task = new List<Task>();
        
        for (Integer i = 0; i < Trigger.new.size(); i++) {
        
            task.add(new Task(
                         whatid=Trigger.new[i].Id,
                         OwnerId=Trigger.new[i].OwnerId,
                         Subject='First Contact '
                   ) ) ;

        }
        
        insert task;

}
 

My idea for this trigger, is to create a task for each new Opportunity created. Is it right?

thanks!

 

 

 

Message Edited by majo on 10-16-2009 08:52 AM
Message Edited by majo on 10-16-2009 08:53 AM
  • October 15, 2009
  • Like
  • 0

Hi,

I have a custom date/time field and I want to seperate it into date and time fields. It would look similar

to the new events in Salesforce calendar. However I don't know how to do this. Does anyone have

sample codes or tips on this issue? Any help will be appreciated.

 

thanks

Paul

 

  • October 08, 2009
  • Like
  • 0
I have encountered a strange problem with a visualforce email template. When I preview the template everything seems to be fine. It appears as I expect in the preview window of the salesforce interface, and the test emails that I send to myself via the 'Preview' button arrive without a problem. However, when the approval process rule triggers the email to be sent the only thing that my users are receiving is an email with the subject only...the body of the email is completely blank! I have yet to figure out why this is, so if anybody has any suggestions I would be very grateful.
Code:
<messaging:emailTemplate subject="New Web-to-Trial Request requires your Approval" recipientType="User" relatedToType="Opportunity">
<messaging:htmlEmailBody >
   <html>
     <body>
    
    <style type="text/css">
      p.regular {font-family: arial; size: 8pt;}
      p.small {font-family: arial; size 8pt; line-height: 100%}
    </style>  
    <p class="regular">
    <br>A New Trial Request has been submitted.</br>
    <br>Account: <apex:outputLabel >{!relatedTo.Account.Name}</apex:outputLabel></br>
    <br><apex:outputText >Requested By: {!relatedTo.Contact__r.Name}</apex:outputText></br> 
     <br>To approve, simply type 'Approved' in your response. You can also review the Opportunity or Approve online at https://emea.salesforce.com/{!relatedTo.Id}</br>
     </p>
     </body>
   </html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

 


Message Edited by AKall on 01-16-2009 01:26 PM
  • January 16, 2009
  • Like
  • 0
Hi all,

We are using Eclipse to migrate metadata between SF organizations and we have checked the documentation available on:

http://wiki.apexdevnet.com/index.php/An_Introduction_to_Force_IDE

Are there any more documents that talk about the FORCE IDE?

We are also wandering if we are using this tool in the best way. We always develop in our Sandbox environment and deploy to production once everything is tested. We do periodic maintenance releases on a bi-weekly or monthly basis. We have created 2 Salesforce Projects, one for the Production System and one for the Sandbox and we have, in both, subscribed to all metadata, as our maintenance releases have a variety of changes (triggers, classes, custom objects, fields, etc... depending).

Is this the right approach? Would it be better to have one project per release and only subscribe to what is changed in that release?

Any help from anyone that has been using this great tool for a while much appreciated. All the best,

J
  • January 15, 2009
  • Like
  • 0
We created a VF page that provided links to all areas of the app that were most commonly used. Two of the links have recently stopped working(I suspect it has something to do with Winter 09.) The two links that stopped working are the first two, which are for 'Home' and 'Console'. The other links are working fine. Can anybody see what the problem is. I get the 'URL No Longer Exists' error.
Code:
<apex:pageBlockSection title="General" columns="3">
            <apex:outputLink value="/home/home.jsp&retUrl=/apex/SLMQuickLinks">Home</apex:outputLink>
            <apex:outputLink value="/ui/desktop/DesktopPage&retUrl=/apex/SLMQuickLinks">Console</apex:outputLink>
            <apex:outputLabel ></apex:outputLabel>
            <apex:outputLink value="/00U/c—cType=1&retUrl=/apex/SLMQuickLinks">Calendar</apex:outputLink>
            <apex:outputLink value="/007–fcf=00B20000003gAZQ&retUrl=/apex/SLMQuickLinks">Activities</apex:outputLink>
            <apex:outputLink value="/007˜fcf=00B20000003gAZR&retUrl=/apex/SLMQuickLinks">Tasks</apex:outputLink>           
        </apex:pageBlockSection>

 

  • October 27, 2008
  • Like
  • 0