I'm trying to write a test method for a method that reads a quote line item and it reads data from the account related to the opportunity, as the following relationship:
account - opportunity - quote - quotelineitem
Then I have those lines:
sfab_FabricatedSObject fabricatedAccount = new sfab_FabricatedSObject(Account.class)
.setField(Account.MinimumDeliveryTime__c, 8);
sfab_FabricatedSObject fabricatedOpportunity = new sfab_FabricatedSObject(Opportunity.class);
sfab_FabricatedSObject fabricatedQuote = new sfab_FabricatedSObject(Quote.class);
sfab_FabricatedSObject fabricatedQuoteLineItem = new sfab_FabricatedSObject(QuoteLineItem.class);
But I can't save the class, because salesforce is interpreting Quote.class incorrectly. I'm getting Invalid field class for SObject Quote.
Oooops, nevermind this issue. The class had a variable named quote, which resulted in the compile error. Using Schema.Quote.class worked as replacement.
I'm trying to write a test method for a method that reads a quote line item and it reads data from the account related to the opportunity, as the following relationship:
Then I have those lines:
But I can't save the class, because salesforce is interpreting
Quote.class
incorrectly. I'm gettingInvalid field class for SObject Quote
.Is there a workaround?