We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [pricebookentry]

Represents a product entry (an association between a Pricebook2 and Product2) in a price book.

Filter by
Sorted by
Tagged with
2
votes
1answer
27 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
27 views

Pricebook2Id not populating in opportunity when default price book is already present

I have applied a default pricebook to a set of users. When I try to add products to that opportunity the pricebook already shows that it is selected at the product selection screen but still ...
0
votes
0answers
6 views

Plan and charges differenciation under products

We have an application that uses Plan and Charges to create an order and payments etc.. Salesforce gave us PRODUCTS, PRICE BOOK and PRICE BOOK ENTRY standard objects as an option to configure a better ...
0
votes
1answer
39 views

I am unable to query pricebook entry. (Internal Salesforce Error)

I am making a lightning component for a user to create a quote + line items quick and easy. However the apex function that is meant to query the pricebook entry and its Id for each line item is ...
1
vote
0answers
37 views

Selecting the Opportunity Price Book

I'm still fairly new to Salesforce Apex and trying to figure out how to select a price book from the opportunity. The reason being I have a trigger which adds in a product when the opportunity is ...
1
vote
1answer
42 views

Is it possible to update Order Product on Draft Order?

We are trying to utilize the Order object, but we're finding that if we create an Order Product, we are unable to change the product (i.e. essentially the Pricebook entry), even if we're in a Draft ...
0
votes
0answers
18 views

Product price book bulk activate

How to update new price to the price books.
0
votes
1answer
29 views

PricebookEntry Conflict Error not matching existing products

I am getting an error message on a trigger that was working until recently. The issue arises on a trigger that inserts an OpportunityLineItem on an Opportunity. Here is the error: Insert failed. ...
1
vote
1answer
278 views

FIELD_INTEGRITY_EXCEPTION when creating Price Book Entry from flow

I have created a flow that creates a pricebook entry for new products (based on a custom field on the Product object), however when I debug the flow it comes up with the following quite generic error: ...
1
vote
1answer
65 views

Failure when inserting records via dataloader, however anonymous apex inserts fine

I'm getting the following error when running dataloader (inserting new quotelineitems), however an identifcal anonymous apex works fine - any thoughts? Error: The price book entry is in a different ...
0
votes
1answer
41 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!
0
votes
1answer
41 views

How to prefill UnitPrice on Order Products

I want my Order Product price to prefill based on the price defined on the Pricebook Entry. I swear I've seen this work in the past, but I can't figure out why this time I keep getting an empty field ...
4
votes
1answer
454 views

In which sequence should I be creating/inserting order/orderItem/pricebookEntry/product2?

I'm on the advanced apex super badge step 7, and before this I thought I had a good understanding of order/orderItem/pricebookEntry/product2/pricebook2 objects. However, upon creating my own ...
3
votes
1answer
477 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
239 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
842 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 ...
1
vote
1answer
380 views

Make Price Book Entry object's Product Code field Read/Write

I'd like to automatically create Standard Price Book entries for new products using dataloader.io. I am successfully creating the new products, using the Product Code as the ID. But when I go to ...
1
vote
1answer
478 views

Can I show the standard price on the product layout page?

I know I can click the Related Tab and drill into the Standard Price Book to see it, but it would sure be nice to just show it on the product page. Is this possible?
1
vote
2answers
566 views

FIELD_INTEGRITY_EXCEPTION, This price definition already exists in this price book

My requirement is to take any pricebook entry made in the standard pricebook and replicate/update it in a second price book. With the code below I keep getting the error FIELD_INTEGRITY_EXCEPTION, ...
-1
votes
2answers
147 views

SOQL Query on PricebookEntry returning no rows

I'm trying to create a queueable apex class which will update the unit prices of all Products (on all Pricebooks) based on newly updated exchange rates. I'm able to successfully query on ...
2
votes
1answer
106 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.
0
votes
2answers
527 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
28 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
754 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
815 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
280 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 ...
-2
votes
1answer
271 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 ...
0
votes
1answer
1k views

Add a lookup to Price Book Entry on a Custom Object

I want to a lookup to PriceBookEntry on a custom object. SalesForce does not give me an option to create a lookup to PriceBookEntry, it only gives an option for PriceBook. Kindly tell me how should I ...
1
vote
1answer
840 views

Process builder Create Product and Pricebook Entry at the same time

We are trying to automate our product creation process, I have created a new object called internal request which has all the product fields we require and once an approval process is approved it sets ...
1
vote
1answer
3k 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
488 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
44 views

Automatically add ProductB once ProductA is manually added to the opportunity [duplicate]

I have been trying to get this trigger to work and it has been impossible... ugh... maybe you guys can help me. I have created the following trigge with the help of some freinds under "Opporunity ...
0
votes
1answer
94 views

Attempt1: execution of AfterInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.Attempt1: line 4, column 1

I'm getting the following error when I try to add a product to an opportunity. I am working on a trigger that would automatically add a productB whenever productA is added to the opportunity. Are you ...
2
votes
1answer
1k views

REQUIRED_FIELD_MISSING & FIELD_INTEGRITY_EXCEPTION on PricebookEntry Insert

I want to use standard price for the Pricebook entry. PricebookEntry pbe = new PricebookEntry(Pricebook2Id='01sN00000002OTsIAM', IsActive=true, Product2Id='01tN0000004JGeuIAG', ...
1
vote
1answer
162 views

Scheduled Process to Update Price Book Entries

I need to write a process to handle the following: Retrieve all price book entries for the standard price book Retrieve all price book entries for non-standard price books that have a matching ...
0
votes
1answer
50 views

Adding Product via VF and getting Pricebookid from Opportunity

In my viualforce page I am adding products - I don't want to hardcode the references to the products, I want the button to pull the proper product per Opportunity. Why does my line not work to find ...
2
votes
2answers
4k 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/...
1
vote
1answer
191 views

Visualforce Lookup field not allowing entry for certain profiles

I have a visualforce form with 3 entry fields, 2 of which work for all profiles but one doesn't. It works for admin profile though. I've checked the VF security setting and field level security on ...
2
votes
0answers
394 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
63 views

Not able to get the UnitPrice using MAP

I have a Custom object Product_Quantity__c and it has a lookup field for Product, when user going to select any of the Product from that lookup field in Visualforce page then what i need is that ...
0
votes
0answers
699 views

Inserting PricebookEntry from apex throwing error

I have Written a trigger to insert a pricebookentry based on creation of product. I am using custom pricebooks in my org. But I couldn't able to insert pricebookentry and apex is throwing following ...
3
votes
1answer
278 views

Why don't I see the Pricebook2Id field as available in formula field on PricebookEntry?

I want to create a formula field on PriceBookEntry using the Pricebook2Id field, but it's not available, yet in the fields like it has it as a reference/lookup field. Product2Id is there. Any idea why ...
2
votes
1answer
1k views

Price book entry is in a different pricebook than the one assigned to the opportunity

I am facing the issue while deploying the test class in production. The test class is working fine in sandbox but failing in production System.DmlException: Insert failed. First exception on row 0; ...
0
votes
2answers
156 views

Deleting a Pricebook Entry using Process Builder that invokes an Apex Class

apologies if i'm wording this incorrectly, i'm not a developer! I want to delete a pricebook entry if a checkbox is checked on the product object, I'm using process builder to determine the records ...
1
vote
1answer
594 views

Not in package.xml error when deploying to Pricebook2 and PriceBookEntry with Ant Migration Tool

I have been successfully migrating fields between orgs using Ant by retrieving from source org and deploying to target org. However, when I got to fields in Pricebook2 and PriceBookEntry, the ...
0
votes
1answer
2k views

Can I add multiple currency prices to a product in one data upload?

I am using the data uploader to add prices to a bunch of products I just created. We work in GBP, EUR & USD; Can I use one spreadsheet to upload all currencies in one hit (standard Price) or ...
0
votes
0answers
448 views

OpportunityLineItem:- Field Integrity Error

I am trying to automate the following functionality: When an opportunity stage becomes 'Pending Payment', insert 2 'OpportunityLineItems' using 2 predefined Products. This is my current code. I am ...
1
vote
0answers
376 views

The StandardPrice field appears in the PriceBookEntry object, but I can't include it in a query

This query works: select name, UnitPrice, ProductCode, UseStandardPrice from PriceBookEntry But this query fails with the complaint "No such column StandardPrice": select name, UnitPrice, ...
2
votes
3answers
1k views

Is that possible to see the list of Price Book Entries?

Is that possible to see the list of Price Book Entries? Does Salesforce have any standard functionality to display it? I tried to find a one but I ended with PriceBook and Products. Any thoughts ...
3
votes
2answers
1k views

Is it possible to upsert PriceBookEntry

I have tried upserting PriceBookEntry PricebookEntry p = new PricebookEntry(); List<PricebookEntry> lstp = new List<PricebookEntry> {}; Pricebook2 pb = [select Id, IsActive from ...