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....
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 ...
8
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();
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 =...
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
...
6
votes
Accepted
Create new Quote using Apex class
You can take help from below:
controller :
public with sharing class QuoteController {
public Quote q {get;set;}
public string qName{ get; set;}
public QuoteController(ApexPages.StandardController ...
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.
...
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. ...
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.
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 ...
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 ...
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 ...
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.
4
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
...
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 ...
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 ...
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....
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....
3
votes
float table to bottom of PDF?
You should define the @page size and footer style like this:
<apex:page showHeader="false" renderAs="pdf">
<head>
<style>
@page {
size: 21.0cm 29.7cm;
margin-...
3
votes
Trigger Validation on QuoteLineItem Based on Quote Status
The reason you are not seeing the error is because the addError needs to be on one of the QuoteLineItem records from the trigger context, which are the records that the save is been done on.
See ...
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.
...
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 ...
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 ...
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 ...
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
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.
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.
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 ...
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 ...
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.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
quote × 268quotelineitem × 58
cpq × 51
apex × 48
visualforce × 33
pdf × 27
opportunity × 26
quote-template × 24
opportunity-lineitem × 17
trigger × 14
custom-button × 12
lightning × 8
lightning-aura-components × 7
soql × 7
email × 7
visual-workflow × 7
custom-object × 7
approval-process × 7
sync × 7
steelbrick × 7
unit-test × 6
process-builder × 6
salesforce1-app × 6
order × 6
contracts × 6