An Opportunity can have associated OpportunityLineItem records only if the Opportunity has a Pricebook2. An OpportunityLineItem must correspond to a Product2 that is listed in the opportunity's Pricebook2.

learn more… | top users | synonyms (1)

0
votes
1answer
13 views

field integrity exception: unknown (scheduling not enabled on product):

I have written a trigger, when opportunityLineItem is inserted the quantity gets scheduled meaning opportunityLineItemSchedule are also gets inserted. Now to re-enter the quantity I have cloned the ...
3
votes
2answers
58 views

Product2id is not writeable Any work around for that

I am trying to clone an opportunityLineItem but I am getting an error : Field is not writeable: OpportunityLineItem.Product2Id public class OppLineItem { public OpportunityLineItem ...
0
votes
1answer
10 views

Generate quote on Products by Year/Length

I am trying to have Many quotes on 1 Opportunity however, use case is: 1 Opportunity can have the same product quoted for 1 year, 2 years, 3 years. I want to add this product and show the 3 different ...
1
vote
1answer
20 views

can we insert a new opportunityline item using existing pricebook,product,opportunity in apex? [closed]

can we insert a new opportunity line item using existing price book, product, opportunity through apex code? if yes, could some one send me a sample code? I am trying with process builder. But I ...
0
votes
0answers
18 views

Opportunity Product Validation Rule Overinclusive

We use Relative Pricing code in our Org, which causes a recalculation of Opp. Prod Unit Sales Price if one of several fields are edited. For this example, let's say those fields are the Total Deal ...
1
vote
0answers
36 views

unable insert opportunity line item from backup object

i have a business requirement to validate opportunitylintem while inserting by a user. if it does not meet criteria,it should not add to opportunity,and go to approval process. once it approved i ...
0
votes
0answers
21 views

Override Opportunity Product Multi-Line Layout with VF Page

I need to override the "Opportunity Product Multi-Line Layout" page(Shown Below) with custom VisualForce Page. For this I need to Add a new custom button(New Button) on the "Product Selection" page ...
0
votes
2answers
23 views

I want to insert some OLI in a test class but i get NULL

I have the following code //Creamos una lista con los line items que iremos aƱadiendo y quitando que referencian a 2 vehiculos y 1 accesorio List<OpportunityLineItem> olitest = new List&...
0
votes
0answers
41 views

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY,

I am writing a trigger to insert the OpportunityLineItemSchedule and getting this error System.DmlException: Upsert failed. First exception on row 0; first error: ...
0
votes
1answer
33 views

SOQL Results differ from Salesforce Report

I have an SOQL query for a Conga button which gives different results from a Salesforce report that has the same filter criteria as the query. Both CongaPete and I are baffled but I don't have ...
0
votes
0answers
32 views

How to access line items in process builder

After the opportunity is closed won, For each Opportunity Line Item, I have to create an Inventory object record , filling out fi elds from the Opportunity Line Item. I am trying this using process ...
1
vote
0answers
32 views

Show Opportunity Line Items in rendered PDF Visualforce page on a Force.com profile

We have a requirement on our custom object bid to show the opportunity line items in a table on a visualforce page when selected by a user on a Force.com licence. We have the functionality working ...
6
votes
2answers
99 views

Opportunity without products Validation rule

How would i create a field (formula?) to check if a opportunity has products that I can use for validation logic: IF productscount>0 (or products not null, empty) AND Probability>50% Then - error ...
0
votes
0answers
12 views

Getting account country/state validation error when adding products to opportunity for that account

I'm attempting to add products to an opportunity whose account has a non-US address with a state. I get this error about the BillingStateCode not being valid for the country: The existing country ...
2
votes
1answer
36 views

Order of Execution during Sync Quote

I am trying to find what happens when Sync Quote is clicked on the Quote. What is the order of execution (Opportunity updated prior to OpportunityLineItem or vice-versa)? The execution flow is ...
0
votes
1answer
21 views

Validation rule that prevents saving a lookup if that lookup value (Product) doesn't already exist on Opportunity

I have an object - myCustomObject__c that is has a Master-Detail relationship to Opportunity. On this object I also have a lookup to Product. I want to throw a validation error if a user tries to ...
1
vote
0answers
21 views

Logic for adding OLI

I have the following code for adding a OLI to an Opp. It is passed an Opp ID and will grab a few Pricebook Entires based on the already set Pricebook and the Product i have set. It will then only add ...
0
votes
1answer
30 views

Problem with Opportunity Product Trigger that is supposed to fire on create (and used to) but now only works on edit

I created a trigger that on creation of an OpportunitlyLineItem that looks at the number of OpportunityLineItemSchedule IDs and sets a Duration field (on OpportunityLineItem as the size of the list. ...
2
votes
2answers
95 views

Updating OpportunityLineItem Quantity with a fixed TotalPrice

I'm seeing a weird change in an OpportunityLineItem's TotalPrice when changes are made to the Quantity field. These records have an additional custom field that holds a fixed rate price that is ...
0
votes
2answers
74 views

Unable to restrict delete permissions on Opportunity Line Items

I am trying to restrict users by profile from being able to delete opp line itmes. For example I have a communities partner profile and under the standard object permissions against the opportunity (...
0
votes
2answers
52 views

Didn't understand relationship 'OpportunityLineItems' in FROM part of query call

I am trying the below query but it results in "Didnt understand relationship OpportunityLineItem". SELECT Id, LastModifiedDate, Account.Id, Account.Name, Owner.Email, UserRecordAccess....
1
vote
1answer
85 views

Error:-PricebookEntryId (pricebook entry is in a different pricebook than the one assigned to the opportunity): [PricebookEntryId]

i am trying to solve this error but not able to solve, can anyone plz help me out. i have already set the standard pricebook. Error---- System.DmlException: Insert failed. First exception on row ...
0
votes
1answer
45 views

Error: Compile Error: Invalid bind expression type of OpportunityLineItem

i am getting this error in lin 12, how to pass multiple product code using list, can anyone please help me out. Error--Error: Compile Error: Invalid bind expression type of OpportunityLineItem for ...
-1
votes
1answer
19 views

How to mass update sales price for specific opportunities?

Trying to mass update sales price for a bunch of our opportunities. Any guidance on how best to get this done? Thx
1
vote
1answer
50 views

Pricing issues on quotes when adding duplicate product codes to opportunities

We've just noticed that when adding the same product code multiple times to an opportunity and then producing a quotation, that the pricing for those duplicate products gets mixed up on the quote. The ...
0
votes
0answers
49 views

How to automatically have OpportunityLineItemSchedules be created when inserting OpportunityLineItem?

If we create an OpportunityLineItem in Apex, and point it to a Product with a Revenue Schedule, it appears as if the OpportunityLineItemSchedules that are generated in the UI, are not generated ...
0
votes
0answers
24 views

Users cant see custom objects. That are connected to the Standard object via master detail relationship

Some of my users can't seem to access a custom object that is master detailed to an opportunity section. Does anyone know how to fix it ? Only system administrators can see it.
3
votes
0answers
22 views

How to Restrict Sales Rep users for not creating the Schedules

Can any help me out with this? I have a requirement where i would like to restrict few users Say As "Sales Rep Users" for not creating the Schedules .I mean their can create a Opportunity record with ...
0
votes
0answers
23 views

Trend report - on custom fields

Need help trying to get a custom field as a 'Historical' report column in the Trend Report Template. You have the 'Amount (Historical)', 'Close Date (Historical)' but I require the a numerical field ...
0
votes
1answer
46 views

Needs to Change the field value of quantity and salesprice in opportunity product

Can any one help me out on this? Basically we have an option to add the products in opportunity.Similarly we do have an option to EDIT ALL product to change the value of fields such as Quantity,Sales ...
0
votes
1answer
36 views

What should my opportunity represent?

There are so many ways we can use opportunity, I'm trying to find out what is the best for our situation. We keep track of multiple contacts using multiple products. And they have to renew their use ...
0
votes
0answers
25 views

Getting Error on “insert oliObj;”

Account testAccount=new Account(Name='TestAccountForTestClass',ShippingCountry='India',RecordTypeId=recordId1); Insert testAccount; Id ...
0
votes
0answers
23 views

split opportunity-Product into product-family groups

I am trying to build a Visualforce page to render as pdf that lists all Products in an opportunity and split them to different product type. Can I use <apex:repeat> tag? That is what I am ...
0
votes
1answer
30 views

API name for Converted Amounts

Within the Opp object there is a Revenue Field. You can choose the base currency but also opt to show next to it what the converted currency is if you are U.S. based for instance. I'm looking for ALL ...
1
vote
2answers
63 views

Help with VF page and Querying OpportunityLineItems

I am doing some work for a client and they have asked if I could make a "child/parent" relationship between OpportunityLineItem (OLI) records. I have been told by someone they have seen it done ...
0
votes
0answers
52 views

Products with multiple dependencies

I am setting up an org for Quotes. Each Quote may have multiple products. I have setup Products with a single dependency (Product Name>Product Family), but not for multiple layers of dependencies to ...
0
votes
2answers
94 views

Trigger for calculation of UnitPrice in OppLineItem

I have the following scenario: I need to calculate the UnitPrice of OppLineItem based on a calculation that takes into account other parameters, such as custom fields and formulas created for the ...
0
votes
1answer
19 views

how to create a new list from other list with filter Product_Type__c

I have a list of records which has a custom field as Product_Type__c.I want to make a new list with similar field type (Product_Type__c ) in one list.I have below list.I dont know how to filter such ...
0
votes
0answers
45 views

Access product field and sorting of each column

I need to Create a new Button on Account detail page, on click of this button new VF page has to be displayed and it should show the opportunities based below conditions. Opportunities Stage - Not ...
0
votes
0answers
19 views

OpportunityListItem ListPrice issue in Test method

I am testing a method that is launched on the onBeforeinsert event of the OpportunityLineItem object. The method needs to calculate a field of Oli, which depends on its ListPrice. Reading the ...
2
votes
1answer
57 views

A quote with multiple product sections

I am attempting to customize a quote to include multiple products sections, for different categories of products. Lets say that I am providing a quote for a home remodel. I want to have the kitchen ...
0
votes
1answer
301 views

Apex Trigger to pull Opportunity Products - multiple - into Opportunity Page Field

This is incredibly simple but I am only just exploring Apex for the first time on my own. I'm looking for an Apex Trigger that will cause a simple Text field on the Opportunity page to list all the ...
1
vote
0answers
62 views

Products Security in Partner Community

We are currently working with Products and Pricebooks in Partner Community. The security side of it is still an idea in Salesforce but is there anyway we could restrict the Products visibility for ...
1
vote
0answers
19 views

Setting up Products with Quantity Price points

Trying to setup products where the product list price would be different based on quantity. Don't see any standard features for products/pricebooks that support this so thinking I would have to ...
0
votes
1answer
61 views

Is this trigger working how it is required to?

What this trigger is to do: Get a related list of Opportunity Line Items IF the stage on Opportunity = Closed Won. Once I get this related list, I need to create a new Opportunity with the account ...
0
votes
0answers
124 views

Sorting the record list by field in Opportunity Products and Quote Line Items related lists

We all know that there is a sort by field option in Page layout for all most all the related lists except Opportunity Products and Quote Line Items. I need to sort the line items by line number for ...
4
votes
0answers
48 views

Revenue Scheduling and Collaborative forecasting

I was working on Product Revenue Scheduling and I have hit a road-block. My Org uses "Collaborative forecasting" and I am not able to configure the forecasting to reflect the schedules. It displays ...
0
votes
0answers
71 views

How can we retrieve the custom fields on line items to another object line items?

I would like to ask you how to retrieve Custom fields on line item between 2 customs object . for example : I have Object Sales order Line Items : customer description - product - product code ...
0
votes
0answers
18 views

error on adding products to a private opportunity

I'm preparing for the Sales Cloud certification and try out all possible settings. I have private sharing model on opportunity. I noticed that when I click the Private checkbox I'm not able to add ...
0
votes
1answer
28 views

Is it possible to make a custom currency field editable only if standard list price field is zero on opportunity products?

I tried creating a validation rule using IsNull, ISBlank and even"" but none of them work so I suspect I am writing it in the wrong way. Any help is appreciated!