Hot answers tagged

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,141
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
  • 90.9k
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();
Fábio Lupo's user avatar
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
  • 67.6k
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 ...
Ajay Dubedi's user avatar
  • 2,225
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
  • 67.6k
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.4k
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
  • 468k
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
  • 148k
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
  • 134k
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

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
  • 67.6k
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
  • 134k
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.8k
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

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

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-...
Sergej Utko's user avatar
  • 21.9k
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 ...
BarCotter's user avatar
  • 12.2k
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
  • 148k
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.4k
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
  • 148k
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
  • 148k
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
  • 468k
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
  • 90.9k
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,027
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

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