New answers tagged code
0
you need to use proper API, let's say that one lookup to contact, have an API named 'contact' so the second is probably created as a custom field by you and it has an API that one ends with "__c"
1
You just have to change the return type of the method to List<OpportunityLineItem>, currently, it expects the method to return a list of Opportunities, but you are, in fact, returning a list of Opportunity Line Items
So your method will look like this:
public static List<OpportunityLineItem> getOppProducts()
{
List<OpportunityLineItem> ...
Top 50 recent answers are included
Related Tags
code × 246apex × 165
trigger × 40
code-coverage × 36
unit-test × 28
visualforce × 26
class × 17
marketing-cloud × 11
after-trigger × 10
lightning × 6
ampscript × 6
javascript × 5
api × 5
custom-object × 5
business-logic × 5
soql × 4
community × 4
map × 4
bestpractice × 4
developer × 4
production × 4
lightning-aura-components × 3
lightning-web-components × 3
batch × 3
deployment × 3