function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shirley MaglioShirley Maglio 

How to retrieve Price from the Product object?

Hi,

I am trying to add a product description field and a price field to a custom object.  This custom object contains a lookup field to a Product object.  I understand the product description field is a standard field of the Product object.  Thus, I created a formula field on the custom object to get the product description from the Product object.

However, the price field is not a standard field of the Product object.  So I could not get the price of the product by via a formula field.  Can anyone give me some pointers as to how to get the price of the product?  This is so I can save it as a field on my custom object.

Any help is greatly appreciated!

Thanks,
Shirley
Sonam_SFDCSonam_SFDC
Hey Shirley,

I suppose you can accomplish this by creating a trigger on the product table such that you can copy the value of the custom field to the price field on the custom object field.

Reference: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers.htm
Shirley MaglioShirley Maglio
Hi Sonam,

Thanks for the tip. :)  I will try it out.

Shirley