• jinman
  • NEWBIE
  • 0 Points
  • Member since 2009

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

I am trying to lookup an SIC code description and display on an account based on the standard Text SIC code field.  I created a custom object called SIC with two columns of interest the SIC Code and a Description field.  The SIC Code field on that object is set as the name (which is required for the vlookup function).  When attempting to create the formula field to display the description I keep on getting errors.  Here is the formula:

 

vlookup(

$ObjectType.SIC__c.Fields.Description__c,

$ObjectType.SIC__c.Fields.Name,

Sic

)

 

I keep on getting an error: 

 

"Error: Field $ObjectType.SIC__c.Fields.Description__c does not exist. Please check spelling."

 

I have checked and double cheked everything and can't figure what is wrong (I am assuming it is a syntax error).

 

Custom Object API Name: SIC__c

Return Field API Name: Description__c

Lookup Field API Name: Name

Value Field API Name: Sic

 

Any clues out there?

  • September 25, 2009
  • Like
  • 0

I get the following error:

 

Error: Compile Error: Variable does not exist: oli.sbu_abbr__c at line 21 column 7 

 

When I try to save the trigger code below. 

trigger oppLineItem_prod_data_trigger on OpportunityLineItem (before insert, before update) { Set<Id> pbeIds = new Set<Id>(); for (OpportunityLineItem oli : Trigger.new) pbeIds.add(oli.pricebookentryid); Map<Id, PricebookEntry> entries = new Map<Id, PricebookEntry>( [Select product2.sbu_abbr__c, product2.bu_abbr__c From PricebookEntry where id in :pbeIds]); . for (OpportunityLineItem oli : Trigger.new) oli.bu_abbr__c = entries.get(oli.pricebookEntryId).product2.bu_abbr__c; oli.sbu_abbr__c = entries.get(oli.pricebookEntryId).product2.sbu_abbr__c; }

 

Can someone tell me what I'm doing wrong.

 

Thanks.