Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

Explain the difference - product vs product2.

Asked by Dipesh Bhardwaj Apr 28, 2023 1.9K views 2 answers
Share

About this question

I want to upsert a Product record using Apex.

When I write:

Product pr = new Product();
It gives an error "Invalid Type: Product".
but when I write
Product2 pr = new Product2();

Then no error occurs. Can anyone please explain the reason behind this.

Your answer

2 Answers

Sheliadnelson Latest answer

Answered on Jul 9, 2025

If you're honing your skills using these skills, be sure to check out blocky blast  for more great content and community discussions!

Was this helpful?

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.