• lizks
  • NEWBIE
  • 5 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies

Our sandbox was updated to Winter 13 over the weekend, and now the HTML we had in the Messages & Alerts component of the Home Page is displaying as the html code and not the formatted text result.  I tested the html outside of salesforce, and it displays correct.  Nothing changed with the code.  Thoughts/Suggestions for what changed with Winter 13?

 

Thanks!

LizKS

Hi,

 

I'm not a developer, but I'm attempting to learn since I've reached a point where I need code to customize and automate further.  I've created a custom "Sales Price" field for Opportunity Products that I am using to replace the standard Sales Price field.  I want the custom field to default with the price book entry list price (unitprice) value as does the standard Sales Price field.  Then I have the standard Sales Price field getting updated to equal the custom Sales Price times the number of month terms (custom field that will be updated at Opportunity level and automatically populated in reflective custom field on Opportunity Products via trigger).  I've created triggers for both the Sales Price value to default and the Month Terms to default, but neither seems to be working now.   Below is the trigger for the Sales Price value when creating a new opportunity line item.  I could have sworn this worked last Friday and now doesn't.  Not sure how to get the price to default when adding a new product line item?  It should only default when adding new since I don't want it to override any amount that they put in and save. But it also needs to work if they go back into the opp and add additional items later.  Any input on this is greatly appreciated. I've spent hours searching other posts in the community and all the other documentation, but I don't have that natural developer brain, and I'm banging my head now!

 

trigger SalesPricecustom on OpportunityLineItem (before insert) {
    Set<Id> pbeIds = new Set<Id>();
        for (OpportunityLineItem oli : Trigger.new) 
        pbeIds.add(oli.pricebookentryid);
        
    Map<Id, PricebookEntry> entries = new Map<Id, PricebookEntry>(
        [select UnitPrice from pricebookentry 
         where id in :pbeIds]);     
            
for (OpportunityLineItem oli :trigger.new){
     if(pricebookentry.unitprice <> null && oli.sales_price__c == null){
    
    oli.sales_price__c = entries.get(oli.pricebookEntryId).UnitPrice;  
  }
}} 

 

Thanks!

Hello, I have a question that I thought somebody on here might be able to help me with.  Let me preface this by saying that I am completely new to Apex/Trigger coding in SF and how it is set up.  But I AM able to see code already constructed and decipher how it is working (I have some programming backgroung but no Apex/SF specific coding background).  Anyhow, to the question.  I am trying to create a field that will list the "Last Activity" for a case.  This is available already on Contacts and Accounts (I believe) but not on Cases.  I am sure I am not the first to deal with this issue and I am also pretty sure that the trigger for this would be very general (i.e. not Org specific) and the only differences might be what one would call an "Activity".  I really only want it to reflect the same as it does on a contact in regards to e-mails sent and received that are related to a specific case.  If someone could provide me with a set of basic trigger code for this I would be much obliged.  Also, I assume the trigger would reside on the activities object, correct?  Thanks in advance!

 

Jeremy Stender

  • September 09, 2011
  • Like
  • 0

Hello,

 

I'd like to create a trigger in order to populate Partner Related List in Opportunity, from a custom field called Partner.

 

I don't have experience in Apex Code, so any comments will be very very helpful!

 

Thanks,

 

Stefano

I would like to automate by creating a workflow which will make the case activity history public without having to click on "Make public" for all items under the activity history.

 

Is this possible? If so how?

  • September 04, 2009
  • Like
  • 0