im trying setting an opportunity field with the name of a related product (there is always only one related product to each opportunity).
but , because im a new admin , im yet not fully control apex,
i though on trying OpportunityLineItems object (in an opportunity apex trigger) and form there get the connection
but i couldn't find the right code for using the LineItems on Opportunity controller.
could some one help me with the code, its very important for us.