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
starlightstarlight 

how to access a field present in custom object from opportunity line product

how to access a field present in custom object from opportunity line product?
I have a custom Object USB,there is a field called USBNumber .
I want to access USBNumber field in Opportunity Product?
sumithasumitha
Hi,

1.Create a new custom Lookup field(Opportunityproduct) in USB object.
2. Create a Formulae field(via lookup field for eg:(Opportunityproduct__c.USBNumber)).

Hope it works.
starlightstarlight
Hi Sumltha,
Thank you for your revert...
You mean should create a field in USB object and link it via lookup relationship to Opportunity Product.
But you dont get the option to link to Opportunity Product.
I can create a field in opportunity product and link it to USB project.But I need to access the values of one of the Field in USB object.
How to do that exactly??
can you please explain in detail???
sumithasumitha
Hi,

Sorry.
Try this steps:

API Name - OpportunityLineItem
Object name - Opportunity Products
What we need to do:  create a lookup field(USBObject ) in Opportunity Product Object.
After creating a  field ,
Create a forumale field in Opportunity Product Object(LookupfieldAPIName.USBNumberAPIName).

Thanks
Sumitha P