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
Som_11Som_11 

Hi all, I am getting an error Id and Pricebook2Id not found

Hi all, I am getting an error Id and Pricebook2Id not found. Can anyone help please.
I am doing devlopment in Scratch Org. Below is the code and Error snippet.
User-added image
Best Answer chosen by Som_11
Abhishek BansalAbhishek Bansal
Hi Somesh,

The query at line 111 will return a list so either use LIMIT 1 in query or use the below code:
order[0].PriceBook2Id;
order[0].id;

Let me know if you need any other help on this.

Thanks,
Abhishek Bansal.

All Answers

Abhishek BansalAbhishek Bansal
Hi Somesh,

The query at line 111 will return a list so either use LIMIT 1 in query or use the below code:
order[0].PriceBook2Id;
order[0].id;

Let me know if you need any other help on this.

Thanks,
Abhishek Bansal.
This was selected as the best answer
Som_11Som_11
Thanks, Abhishek