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
V'NathV'Nath 

Reg : system.query Excepiton

hi,

 

The below query retunrs the error system.query Exception but its working in System log  . please any help regards this issue.

 

 

Pricebook2 pbook = [select id from Pricebook2 where IsStandard = true limit 1]; 

 

 

Regards,

V'nath

 

 

Devendra@SFDCDevendra@SFDC

 

Try this:

 

Pricebook2 pbook = [select id from Pricebook2 where IsStandard =: true limit 1]; 

 

Hope this helps:)

 

Thanks,

Devendra

DeepabaliBDeepabaliB

 Pricebook2 pbook{get;set;}

 List<Pricebook2 > pbooklist = [select id from Pricebook2 where IsStandard = true ]; 

 pbook=pbooklist .get(0);

 

 

  

 Thanks,

 DB