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

Problems with Quote object in Apex after Spring 12

Since Spring 12 I can no longer compile some Apex code that uses the QUOTE object.  In all cases this code prvisouly compiled and is deployed in production.  It just wont compile now in my sandbox.

The following two statements are real problems:

1. Creating a new Quote for testing:

Quote q = new Quote(, PriceBook2id = pb.Id, name='Tst Quote');
insert q;


ERROR: Save error: Invalid constructor syntax, name=value pairs can only be used for SObjects  

2. Initialising a map using a list of Quotes

Map<Id, Quote> mapQuoteOpp = new map<Id,Quote>([SELECT OpportunityId FROM Quote where Id in :setWhatId]);

ERROR: Save error: Invalid initial type LIST<Quote> for MAP<Id,quote>   

Has anyone had similar problems?
Any ideas on the cause and/or solution?