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();
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....
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
...
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
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 ...
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
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
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
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.
2
votes
Syncing custom fields between QuoteLineItem and OpportunityLineItem
It seems like "OpportunityLineItemId" field on Quote Line Item object is a special field.
SELECT Id, OpportunityLineItemId FROM QuoteLineItem WHERE QuoteId ='0Q01N00000xxxxxxx' AND ...
2
votes
Need help On Quote Line Item
tl;dr version:
I don't think what you're asking for is feasible, and you (or your manager) need to rethink your requirements (as well as doing some independent research).
long version:
This is a ...
2
votes
Accepted
How to query the customfield in the OpportunityProduct by apex?
Points which were helpful for you in solving the problem...
Opportunity Product is the object which shows list of Products related to an opportunity. We refer it as OpportunityLineItem in code.
...
2
votes
FIELD_INTEGRITY_EXCEPTION, The price book entry is in a different price book than the one assigned to the Quote, or Quote has
In the part of the code where you're creating the quote, you need to assign the Pricebook2Id field.
q.Pricebook2Id = opp.Pricebook2Id;
2
votes
Steelbrick - how to add product options when selecting product bundle in Apex
I don't think there is any need of checking the API. What you can do is,
1) Query the Product Option object and see if the product you are trying to add as the line item is a Configured Product ...
2
votes
Accepted
Approval process not assgining to correct approver , Approval process not working as expexted!
in your condition first else is "Approve" so it wont execute 2nd and 3rd step
Your approval Steps should be like this :
step 1 : check if its >10 then send to manager else "next step".
step 2 : ...
2
votes
Admin trying to add Field History Tracking to Quote Line Items, Insufficient Privileges?
Apparently, you can't yet track field history on quotes (and presumably quote line items). Only the standard objects in the documentation you've looked at support this feature. See this Idea.
2
votes
Accepted
Opportunity LineItems is deleted when trying to sync quote
The doc on how quote sync works doesn't really get into the nuances much.
There's some different scenarios not explicitly called out that occur below:
If you create a Quote from an existing ...
2
votes
Accepted
Can't Access Quote Line Items through Quote Object in Process Builder
You can't query child records from process builder. You'll have to use a record-triggered Flow, since flows can query and loop through child records.
2
votes
Accepted
Summer'21: OpportunityLineItem always empty for QuoteLineItem. Now how to fill QuoteLineItem custom fields?
Here is the trigger that solves the problem for our org. Note: our org has the special property that all Opportunity Line Items have unique ProductCodes within one Opportunity (we have Apex code that ...
1
vote
Pricebook and PricebookEntries with different currencies
Price books do not have a currency (there is no CurrencyIsoCode field). Salesforce includes special behavior that allows only one product per currency per price book. In other words, a price book ...
1
vote
Accepted
QuoteLine Item Standard object "Discount"
You need to set the value to 1, not 100. This is because internally, percentages are expressed as being a decimal percentage. This is what allows you to write Discount * UnitPrice, for example, to ...
1
vote
Failure when inserting records via dataloader, however anonymous apex inserts fine
Check your usage of the QuoteLineItem.Product2Id in data loader. From the docs for Product2Id:
Required. ID of the Product2 associated with this QuoteLineItem. In API 38.0 and earlier, if ...
1
vote
How are QuoteLineItems related to OpportunityLineItems
QuoteLineItems and OpportunityLineItems are not directly related. Look at this ERD for Product and Schedule Objects from the SOAP API Developer Guide. You can grab the idea of how these object ...
1
vote
Accepted
Illegal assignment from List<Quote> to List<Quote>
I suspect you have a class or variable named Quote. For this reason, I always recommend you don't name classes or variables that are literally the same as a standard object. However, for now, you can ...
1
vote
Add multiple Item on quotes with VF Page by a Button
I was thinking of calling a VF page from a button that would add all
lines of items from my Construction line
Because of salesforce limitation, you cannot do insert/update/delete aka DML inside the ...
1
vote
Steelbrick - how to add product options when selecting product bundle in Apex
Instead of doing manually by writing your own code, check with the steelbrick (which is now Salesforce CPQ), Is there any API available which you can use here. where you can configure the Bundle ...
1
vote
FIELD_INTEGRITY_EXCEPTION, The price book entry is in a different price book than the one assigned to the Quote, or Quote has
I'm not familiar with these objects. But relating your error message to the Product and Schedule Objects ERD, it appears you need to specify a PriceBook2Id on your Quote (probably taken from the ...
1
vote
Accepted
Cloning Opportunity with Synced Quote and its Quote Line Items
Okay I figured this out. Turns out there's a process that gets called in our organization when I insert the Quote Line Items, which because I was inserting the Quote Line Items before giving the ...
1
vote
Accepted
Where do Existing Quote Records Go after Quotes are Disabled?
I just tested this in my developer org, and the answer is apparently: nothing. The object itself is disabled, but the quote records do not "go" anywhere. I've turned it off and on a few times, and no ...
1
vote
Quote Line Item Description vs Product Description
Rich text will not render as Rich Text in a PDF Template. This is a known limitation of the PDF Render Engine. See Visualforce PDF Rendering Considerations and Limitations for more on this.
The PDF ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
quotelineitem × 98quote × 59
opportunity-lineitem × 21
cpq × 20
apex × 14
visualforce × 11
trigger × 9
opportunity × 9
quote-template × 7
visual-workflow × 5
process-builder × 5
product × 5
custom-field × 4
pricebookentry × 4
cpq-plugins × 4
soql × 3
javascript × 2
community × 2
query × 2
formula × 2
formula-field × 2
validation-rule × 2
approval-process × 2
configuration × 2
delete × 2