Questions tagged [pricebook]

Represents a price book that contains the list of products that your org sells. Price books are represented by Pricebook2 objects.

Filter by
Sorted by
Tagged with
0
votes
1answer
14 views

STANDARD_PRICE_NOT_DEFINED, No standard price defined for this product

I checked the other answers about this topic but I have no clear result. I think Id pricebookId = Test.getStandardPricebookId(); is use to get a standardPrice before insertion of PricebookEntry in a ...
0
votes
2answers
44 views

Update both Pricebook2 and PricebookEntry objects using just one for loop

Having the next code: for (WrapperTest pb : pbs_lst) { Pricebook2 newPB2 = new Pricebook2(); PricebookEntry newPBE = ...
0
votes
0answers
20 views

Trigger after Insert Order Item - PriceBook Entry

I have a trigger After insert on OrderItem. This Trigger should insert automatically dependents product in the order . My Problem is that I don't understand how I can efficiently set the ...
0
votes
0answers
11 views

Query on Pricebook-Manual Sharing [duplicate]

I would like to know if there's a way to export all Manual Sahrings that have been done on Pricebook records. I would like to know, for each pricebook record, with which user/role/public group has ...
0
votes
1answer
18 views

Report on opportunities that do not have a pricebook assigned

We just introduced products and pricebooks into our org. I am looking to update all historical data as well. I want to see, which opptys do not have a pricebook attached to them, is it possible?
0
votes
0answers
14 views

Add Product on Order - PriceBookEntry not active

For some sale processes, I need to add specific items on Order through code that I don't allow users to Add from the add Product screen. To do that I simply disactivated the PriceBookEntry of this ...
0
votes
1answer
134 views

Insert PriceBookEntry using Product2 External Id field

I am developing an external application which will insert & update products and their pricebook entries into Salesforce system. In order to avoid maintaining the Salesforce ProductId in my ...
1
vote
0answers
20 views

pricebook sharing

We have two active pricebooks. OWD is set to "No access" on pricebook and we have extended sharing to "All internal users" on PB1 with "use". But no sharing on PB2. When ...
0
votes
0answers
48 views

first error: INVALID_CROSS_REFERENCE_KEY, Entity not available: [PricebookEntryId]

When I am trying to run my test class I am getting the below error. System.DmlException: Update failed. First exception on row 0 with id 8023B000000ekyaQAA; first error: INVALID_CROSS_REFERENCE_KEY, ...
0
votes
1answer
104 views

How to display Product fields and it's pricebookentries in a single datatable?

I need to dynamically put products and the products' pricebookentries in a single row in a datatable. If I add a pricebook, a new column and it's prices should also be displayed. I could do this for ...
0
votes
1answer
152 views

How to query products from pricebook

I have a pricebook set up with several products in it. I would like to query these products and display them on my React app. I am a little confused on how to go about this as I am a newbie to ...
0
votes
1answer
42 views

Not Able To Update Price Entries

I am trying to insert products, then those products then create price entries if they don't already exist but if they do exist they update the previous price entry based on the name of the product ...
0
votes
1answer
79 views

Load PricebookEntry in empty Scratchorg with Cumulusci

When generating a .yml file with generate_dataset_mapping with cumulusci it resolves in following code(sample): Insert Product2: sf_object: Product2 table: Product2 fields: Id: sf_id ...
0
votes
1answer
1k views

What does “Use” mean in Organization-Wide Defaults of Pricebook object?

I was looking for OWD Settings for Product2 object and found that OWD for Product2 is managed by Pricebook object. On checking the defaults in Pricebook object, it is set at Use unlike others which ...
0
votes
1answer
64 views

Order Pricebook2Id to manage with multiple Order Product Pricebooks

Scenario: There are multiple Order Products with different Pricebook(Year wise Pricebook) to be added on Order Object. But, on Order Object we can only set a single Pricebook Id. Can anyone please ...
-1
votes
1answer
370 views

Add a picklist value to Global Value Set in test class

I am working on test class that inserts an Opportunity with the opportunity products using the correct price book/price book entry. The OpportunityLineItem has a ProductSelected__c picklist field. We ...
0
votes
1answer
459 views

Different currencies in PricebookEntry throwing exception FIELD_INTEGRITY_EXCEPTION, PricebookEntryId (must have the same currency as the order)

I wrote a trigger which converts a Quote to Order on changing Status to a particular value. This Quote has QuoteLineItems, hence, they should converted to corresponding OrderItems. Now when the ...
0
votes
2answers
360 views

Pricebook and PricebookEntries with different currencies

Can Pricebook and its PricebookEntries have different currencies? So, if I create a Pricebook with currency USD and its PricebookEntries with multiple currency like USD, GBP, AUD, etc., is this ...
0
votes
1answer
177 views

How to know which Pricebook being chosen for an Order

I am planning to write a lightning web component to check which Pricebook is being used. However my problem is that from the Order, I can trace back to the Contract and from Contract I can have the ...
2
votes
1answer
532 views

PriceBookEntry required field missing when creating QuoteLineItems

I am kind of new to CPQ and have been trying to create a Quote Line Item with no success. Opportunity OpportunityOne = [SELECT Id, PriceBook2Id FROM Opportunity WHERE Id='...
0
votes
0answers
294 views

Pricebook field auto population in Quote Record Salesforcec CPQ

Pricebook field (Pricebook2Id)is auto populated on opportunity record by a visual workflow that looks up the right pricebook record from pricebook object based on an account field in the opportunity ...
1
vote
1answer
337 views

Net total of a quote line item is changing upon calculation

I have a product set to $5000. The product option is set to $5000. When the product is added to the bundle and it is saved, it jumps to $9000. The standard price of the product is set to 5000, it is ...
0
votes
2answers
795 views

Salesforce CPQ: Contracted Pricing is Not Overriding Pricing Rule Price

If a product has only a list price and contracted pricing for the product and particular account is setup, whenever the user is adding that product to the Quote under that particular account, the ...
0
votes
1answer
97 views

pricebook lookup field is not autopopulating

I have a opportunity object and a pricebook lookup field on that object. I have a create order button on opportunity object when I clicked the button the detail page should be open and pricbook lookup ...
0
votes
1answer
227 views

Trying to do an SOQL Query for all product names and their Price books

I Have a Salesforce Org where there are almost 1000 products and 51 Price books, I want to know a query where I can get each product and the price books they belong to. Any help is much appreciated!
1
vote
1answer
265 views

Disable Price Book Lookup

when an opportunity is created and saved, "Choose price book screen appears". I have inherited sales cloud environment where no documentation has been provided, now the business requirement is not to ...
3
votes
1answer
1k views

Find all Product2 records that do NOT have a PricebookEntry in the Standard Price Book

We have come to find that we have a small amount of products that have Product2 records, but no PricebookEntry for them. I'm trying to query for just those products, but I am having trouble with the ...
0
votes
1answer
425 views

Deep Cloning a Product - Clone Standard Price and Custom Prices

I have created a Record Detail button to clone a Product's detail, a related list called Bill of Materials, and both the Standard PB Entry, and any Custom PB Entries. If I remove the Custom PB Entry ...
1
vote
1answer
2k views

Automatically add a Standard Price Book Entry after creating product

I am successfully importing a CSV of products and creating Product objects in Salesforce. I'd like to be able to automatically (or even via CSV update) create Standard prices for those objects, but ...
2
votes
1answer
159 views

In Pricebook Entry validation rule I am not able to access the Pricebook fields

I am trying to create validation rule under Pricebook entry object. In that I am not able to access the Pricebook field, we have standard lookup "Pricebook" field in Pricebook Entry.
1
vote
1answer
400 views

Share Pricebook record to the current user using Apex trigger or class or Flow

If there any Option to share the newly created Pricebook using Apex class to Current user. We have separate object(Opportunity Share) for Opportunity sharing like that do we have any object to share ...
0
votes
2answers
1k views

Test Classes failing due to default custom pricebook

Our admins developed and activated a process builder in Production to set a default custom pricebook on opportunity during the opportunity creation process. Due to this, several of our test classes ...
1
vote
0answers
63 views

Timeout Error when cloning a pricebook

I am getting a timeout error when cloning my Standard pricebook. Any known limits (as to the number of product or pricebook entry records)?
0
votes
2answers
2k views

FIELD_INTEGRITY_EXCEPTION, The price book entry is Inactive

I'm a bit stumped. Everything was working fine for a few months and then errors like this started popping up, any idea how to fix it? Here's the trigger : trigger RenewalOppTrigger on Opportunity (...
2
votes
1answer
1k views

can i maintain 5 prices for a product with the same currency based on its volume?

The current status of out business is such that , they maintain different prices for different cities in the same country. Also, they maintain different prices for different volumes. Example : ...
0
votes
1answer
670 views

Unable to set pricebook Id in orderitems

I am writing trigger "On Insert Of Order(Sales order) copy opportunityLineitems to order line items" I have done everything fine upto my knowledge but when I am inserting order it is showing pricebook ...
1
vote
1answer
409 views

Problems using standard pricebook in unit tests

We are running into problems with our unit tests which use the standard pricebook. When they are run separately they work fine, but as soon as we do a "run all" several tests fail with message: ...
1
vote
1answer
394 views

When does Salesforce remove Pricebook2Id on currency changes?

We have multi-currency enabled and custom pricebooks. I have a before insert class that automatically sets the pricebook when an Opportunity is created that works well. When a user changes the ...
-2
votes
1answer
437 views

Getting Pricebook entry Error

Hello I want to automatically add a secondary product when a user adds a product to an Opportunity. I have a trigger that feeds the lineitem to a class. My class then looks for the product but ...
1
vote
0answers
711 views

How to change the record type of existing opportunities to another record type?

There are around 800 opportunities for which I want to change the record type of that opportunities. These 800 opportunities are related to different product books. when I change the opportunities ...
3
votes
1answer
1k views

Standard vs Standard Price Book

What is the difference between Standard and Standard Price Book? I am quite confused why there are two price books by default.
1
vote
1answer
196 views

No Products Populate in Pricebook to add to Opp

There is so much info online about this already and I have already checked off the following which I am told would be causing an empty product list when trying to add products to my opp in the UI. Am ...
0
votes
1answer
66 views

Updating Product B value once Product A is edited in the product section of an Opportunity

The goal of the trigger is to automatically add "Product B" to the opportunity once "Product A" has been added manually by the Technical Writer. The code works really well, but I need Product B to ...
1
vote
1answer
4k views

Apex class getting the product fields from pricebookentry where pricebook name ='Test' [duplicate]

We are having Product , Pricebookentry and pricebook in SFDC as a standard object. here pricebookentery is having look up to product and pricebook. so i want to get all the prodcuct fields which is ...
1
vote
1answer
747 views

auto-add product to opportunity based on product that has been added manually

Code: trigger Attempt1 on OpportunityLineItem (after insert) { List<OpportunityLineItem> oliList = new List<OpportunityLineItem>(); List<String> lstProductNames = new ...
1
vote
1answer
280 views

How to load Opportunity Product using Test.loadData?

Is it doable for Opportunity Product to be load using Test.loadData while Standard Price is not accessible in Test class? I try to automate the data population make it easy for user to define ...
2
votes
2answers
6k views

FIELD_INTEGRITY_EXCEPTION, field integrity exception: PricebookEntryId (pricebook entry is inactive): [PricebookEntryId]

Can't wrap my head around this error. Any ideas? @isTest public class RemoveProductFamilyTriggerTest{ static testMethod void RemoveProductFamilyTriggerTestmethod() { Date cd = date.parse('10/10/...
2
votes
0answers
527 views

Get a pricebookEntryId for a custom object(having product2id field)

I have a custom object SapLine which is like opportunityLine, i.e has a product2 lookup field. The hierarchy is Opportunity-->OpportunityLineItem, SapOrder-->SapLine. I created a PricebookId field on ...
0
votes
1answer
586 views

How to filter the products that can be added to an Order?

Begining to look at Orders and Products and I have a very basic question: How can you filter the Products that are available on an Order? All of our accounts can create an order, we have various ...
0
votes
1answer
316 views

Error while cloning opportunities with products

I'm getting this error message: An attempt was made to modify the opportunity price book as the opportunity was being cloned.This is not allowed for an opportunity with associated products.