Hot answers tagged

9 votes

STANDARD_PRICE_NOT_DEFINED, No standard price defined for this product: []

Since Summer 14, it's been possible to Create Price Book Entries in Apex Tests irrespective of the state of SeeAllData: Id pricebookId = Test.getStandardPricebookId();
Fábio Lupo's user avatar
9 votes

STANDARD_PRICE_NOT_DEFINED, No standard price defined for this product: []

This error is because you haven't added your product to a standard price book. To be used in custom price books, all standard prices must be added as price book entries to the standard price book....
Oles Malkov's user avatar
  • 2,161
9 votes
Accepted

Programmatically generate Quote PDF in Lightning Component Apex controller

I've found a solution by experiment (with a hat tip to @KeithC, who got me speculating on a productive path), but I don't understand why it works/the direct path doesn't work. I would be happy to ...
David Reed's user avatar
  • 92.6k
8 votes
Accepted

IsSyncing test class quote

To enable quote to opportunity sync'ing you have to set Opportunity.SyncedQuoteId to the quote id you want to sync with. From salesforce docs: public void startQuoteSync() { Opportunity opp =...
Chris Fellows's user avatar
7 votes

VF compile error: standardsetController - void.Id

Your issue is you are using quotes in two places for two conflicting use cases As RecordsetVar ​<apex:page controller="QuotePageController" recordSetVar="quotes"> As Getter in controller ...
cropredy's user avatar
  • 70.9k
5 votes

What really is a difference between Contracts and service Contracts

Service Contracts represent (per the doc) customer support agreements (warranties, subscriptions, Service level agreements) Service Contracts typically surface within Service Cloud interactions. ...
cropredy's user avatar
  • 70.9k
5 votes
Accepted

Pricebook and PricebookEntries with different currencies

One Pricebook can have multiple Pricebookentries for the same Product2. Example Pricebook2: MyCustomPricebook Product2: MySKU PricebookEntries MyCustomPricebookId MySKUId USD 10.00 ...
cropredy's user avatar
  • 70.9k
4 votes
Accepted

SOQL query to retrieve Quote Line Item records from Quote Record

In a parent query , you can use a child sub-query, formally known as a Left Outer Join: SELECT Id, (SELECT Id FROM QuoteLineItems) FROM Quote WHERE ... As a separate query: SELECT Id FROM ...
Adrian Larson's user avatar
  • 150k
4 votes
Accepted

Validate Contact name on Quote object

You need to reference the lookup field. Contact represents the relationship, which is always null in a trigger (you can query for it if you need it). The field you need to check is ContactId.
sfdcfox's user avatar
  • 487k
4 votes

Relationships of Opportunities, Quotes, Contracts and orders

There are few thing which should be considered when using Contract:- Contract are signed for Organisation and signed by Contact of the Organisation. Opportunity can be associated with one Contract. ...
Ashwani's user avatar
  • 22.6k
4 votes

How to use Test.getStandardPricebookId for classes that automaticaly sync quotes

Create a custom price book, set is as active (IsActive=true) and use it. If you are using a price book entry, then make sure standard entry is created before the custom one. This is because a standard ...
Subbu's user avatar
  • 41
4 votes

Programmatically generate Quote PDF in Lightning Component Apex controller

The getContentAsPDF call operates in a separate transaction. So if you make that call from within the transaction that sets up the data, that getContentAsPDF call will not see the data at all as the ...
Keith C's user avatar
  • 136k
4 votes
Accepted

Create Package Version Error: Entity Quote not found

You have to enable quotes. The sfdx-project.json file has to have IsQuoteEnabled set.
Jason Hardy's user avatar
4 votes
Accepted

Creating quotes - code just stops running with no errors

The getContentAsPDF call works in a separate transaction, and as the transaction it is called from has not yet committed, the data is not visible. Hence the need to break this up into two sequential ...
Keith C's user avatar
  • 136k
3 votes

Does Quote Line Item reference back to which OLI it relates to?

With API version 40.0 , there is new "OpportunityLineItemId" field which tracks the opportunity line item the quote line item is created from. https://developer.salesforce.com/docs/atlas.en-us.api....
Mitesh Sura's user avatar
3 votes
Accepted

Detect Quote PDF generation at the Quote level

Here's one possibility that comes to mind if you were to write a trigger on Quote. There's no Quote History object, but there is the Quote PDF's related list that may have some kind of impact on the ...
crmprogdev's user avatar
  • 40.9k
3 votes

Quote Trigger Initial term of field expression must be a concrete SObject: Boolean at line 32 column 89

The map function containsKey returns a boolean value. But you try to get the Quotes out of it. You should use get function of map. Change this for(Quote existingQuote : mapOfOpps.containsKey(qRec....
Vigneshwaran G's user avatar
3 votes

SOQL query to retrieve Quote Line Item records from Quote Record

Here is the syntax from Parent to Child:- SELECT Id [Fields...,] , ( SELECT Name, [..Fields,] FROM QuoteLineItems ) FROM Quote WHERE Id=:Quote_ID Child Relationship name of Quote Line ...
Ashwani's user avatar
  • 22.6k
3 votes
Accepted

Method does not exist or incorrect signature: [System.XmlStreamWriter].writeCharacters(Date)

If you look at the XmlStreamWriter documentation, the signature of the writeCharacters method accepts String only. writeCharacters(text) Writes the specified text to the output stream. ...
Adrian Larson's user avatar
  • 150k
3 votes

Is there an api call to create the quote PDF and store it under the Quote as a child?

You can build a REST API in SFDC for this and insert a quote Document Record . A Quote document record will need a document or a pdf and to generate blob data for PDF you may try using a simple VF ...
Mohith Shrivastava's user avatar
3 votes
Accepted

Does Quote have CurrencyIsoCode field?

You seem to have answered your own question. The SOAP API Developer Guide also lists this field. CurrencyIsoCode Type picklist Properties Defaulted on create, Filter, Restricted ...
Adrian Larson's user avatar
  • 150k
3 votes
Accepted

Initial term of field expression must be a concrete SObject:Id

Here's your problem: contractId.sfbase__Billing_Term__c You should reference the entire record to pull a specific field value, not reference its Id: contract.sfbase__Billing_Term__c
Adrian Larson's user avatar
  • 150k
3 votes
Accepted

Cannot query ContractId on Quote object in apex trigger

The Quote.ContractId field requires at least API version 31.0. Please edit your class' or trigger's metadata to at least version 31.0.
sfdcfox's user avatar
  • 487k
3 votes
Accepted

Are quote line items automatically created when inserting a quote in apex

It does not. In Apex, you need to explicitly create and insert the QuoteLineItem objects you want, providing the QuoteId and PricebookEntryId lookup values and the Quantity and UnitPrice.
David Reed's user avatar
  • 92.6k
3 votes

Change total labels in a quote generator CPQ

Net Total (SBQQ__NetTotal__c) is available in Quote Line object (SBQQ__QuoteLine__c). I think, Total Monthly VAT is custom field created in this object. Also, refer Line Editor tab under Setting ...
Santanu Boral's user avatar
3 votes

Auto populate Subscription term in Quote line editor

The Subscription Term on the Product and Quote are controlling different things. On the product, this is saying that a subscription product is priced at X cost for that term. If you have a product ...
brezotom's user avatar
  • 1,077
3 votes
Accepted

Creating CPQ QuoteLineGroup records via Apex not visible in Editor

You have to set the Quote field SBQQ__LineItemsGrouped__c to true to use quote line groups or solution groups.
Christopher Hickman's user avatar
3 votes

Software as a service

CPQ simply adds an extra layer of features to the objects already present in Salesforce. You can enable Orders, Reduction Orders, and Quotes without CPQ. You'll find them available in the Setup menu ...
sfdcfox's user avatar
  • 487k
3 votes
Accepted

How can i refer QuotelineItem fields from Quote Object?

No, you can't build formulas on child objects. You could use a trigger or rollup summary field to transfer the information up to the quote, which you could then reference in a formula.
sfdcfox's user avatar
  • 487k
2 votes
Accepted

How to create an AUD quote if opportunity is in USD?

You are swimming against the tide here. As @sfdcfox says, OOB SFDC currency works in a certain way and for good reason as Quote line items can be sync'd to Opportunity line items. Normally, one has a ...
cropredy's user avatar
  • 70.9k

Only top scored, non community-wiki answers of a minimum length are eligible