Skip to main content

Questions tagged [opportunity-lineitem]

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.

Filter by
Sorted by
Tagged with
12 votes
3 answers
2k views

Is there any way to get changes to OpportunityLineItemSchedule objects?

This is kind of a weird request - so bear with me. I need to detect changes in the OpportunityLineItemSchedule. Ideally i'd write a trigger against it but SFDC doesn't allow triggers against this ...
Ryan Elkins's user avatar
  • 7,687
11 votes
2 answers
4k views

Sorting Opportunity Line Items programmatically

I've been attempting to do a purely Apex based sorting of Opportunity Line Items based on a solution I found in the Salesforce developer boards. That solution uses a combination of Javascript and Apex ...
Alan Morey's user avatar
  • 2,451
8 votes
1 answer
12k views

Relation Between Opportunity Products and Opportunity Line Items

I read about Opportunity Object and OpportunityLineItems and sub object in Opportunity named Opportunity Product Object.Is OpportunityLineItems and Opportunity Products are same thing or different?? ...
mathlearner's user avatar
  • 2,151
8 votes
1 answer
867 views

SLEEPY Strikes again - Validation bugs

I've got a class which uses a wrapper class to handle OpportunityLineItem's which both have ids and don't have an id. Before calling an upsert on these records to update them, I extract the records ...
battery.cord's user avatar
  • 8,835
8 votes
1 answer
4k views

How to Change the Opportunity Amount

Once I add Products to the Opportunity I can no longer edit the Opportunity's Amount field. Is it possible to change that amount so that it is saved on the Opportunity as a different amount? Possibly ...
Peter Knolle's user avatar
  • 29.1k
8 votes
5 answers
4k views

Setting up Subscription based products

We sell a subscription based product, based on volume pricing/usage, billed at the end of each month. How would you set that up with products/opps/contracts in SFDC? Ideally we would have 1 ...
user1022913's user avatar
7 votes
2 answers
1k 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 ...
Andy Ux's user avatar
  • 97
6 votes
2 answers
1k views

java.sql.SQLException error caused by OpportunityLineItem DML request

In our Salesforce.com organization, we have a trigger on the OpportunityLineItem object (insert/update), automatically generating OpportunityLineItemSchedule. The product is schedule by revenue, ...
jpmonette's user avatar
  • 4,440
6 votes
2 answers
17k views

How to customise columns in Add Products popup

Question How do I customise the columns that appear in the Add Products popup which appears if you click the Add Products button on the Products related list on the Opportunities record page? What I'...
Robs's user avatar
  • 9,376
6 votes
2 answers
4k views

Solved Code for rescheduling opportunityLineItemSchedule when changing CloseDate on Opportunity

Resolved code for updating OpportunityLineItemSchedule ScheduleDate to new CloseDate when close date is changed on Opportunity object. Also to update OpportunityLineItem ServiceDate on change of ...
Dave's user avatar
  • 507
6 votes
2 answers
2k views

Do Opportunity Products (OpportunityLineItems) count against storage limit?

I am bit confused about whether Opportunity Products count against storage limits or not? We have a lot of Opportunity Products in our system but in the storage tab, we do not see Opportunity Products....
RajeshShah's user avatar
  • 1,754
6 votes
1 answer
1k views

How can we add products to an Opportunity using sforce.one.createRecord()?

Following the documentation on navigation with the sforce.one object, I'm attempting to create Opportunity Products with a link on a Visualforce page that has been added to the page layout and is ...
Philip F's user avatar
  • 343
6 votes
2 answers
11k views

How do I update the Opportunity 'Amount' field with a formula that sums custom Opportunity Product fields?

First off - the documentation on the SFDC site is incorrect on this issue. The question keeps getting asked, people get referred to this link, and then they soon write back saying that it DOES NOT ...
Bart__c's user avatar
  • 172
6 votes
1 answer
2k views

Copy Opportunity Products to Contract Line Items

I have created a flow does several actions: create a new Service contract with user input (start date, end date, name) create a new license key to send to end user change the opportunity to closed ...
Itay B's user avatar
  • 703
5 votes
1 answer
4k views

Using the REST api to create parent and child records in a single http request

I know that it is possible to insert Orders and Order Products together with a single HTTP request: Salesforce Place Order REST api p23 But when trying the same basic thing with Opportunities, I'm ...
martin's user avatar
  • 12.7k
5 votes
1 answer
1k views

Accessing OpportunityLineItem ProductCode field

Currently I'm having issue saving my code: public static void myMethodMyMethod(Map<Id,OpportunityLineItem> OLIs, String action){ for(OpportunityLineItem oli:OLIs.values()){ ...
Eric Luu's user avatar
  • 890
4 votes
3 answers
11k views

How to find out relationships for SOQL queries?

I want to construct a SOQL query displaying all Opportunities that are sorted by the Products that are associated to it. I however have a problem finding out how Opportunities and Opportunity ...
mcbetz's user avatar
  • 927
4 votes
2 answers
5k 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 ...
Anzar's user avatar
  • 954
4 votes
1 answer
1k views

Different currencies in the same opportunity

it's possible to have different currencies in one opportunity? for example: line item 1 $USD line item 2 $MXN Thanks
Edgar's user avatar
  • 1,279
4 votes
1 answer
2k views

How to get a report of accounts without a certain product?

I need to get a report of accounts of which never purchased a certain product. Is there a native way/report to do that? I created a custom report. What I need is the AUB-C = All accounts with a ...
Saariko's user avatar
  • 5,610
4 votes
2 answers
4k views

Opportunity Product Button

Do you know if i can add a custom button on product section on opportunity?That is near the buttons ADD PRODUCT_CHOOSE PROCE BOOK_SORT To solve this I have created a List custom button (...
Enry's user avatar
  • 3,726
4 votes
1 answer
1k views

How to add a flat amount discount on an oppty/quote?

I have a very complicated oppty, that eventually, needs to get a discount of XX dollars. I have the SF quotes module installed, thinking I can modify the fields there. I can play with each lines % ...
Saariko's user avatar
  • 5,610
4 votes
3 answers
2k views

Access to the related QuoteLineItem in OpportunityLineItem Trigger

I'm looking for a way to access the QuoteLineItem from a OpportunityLineItem trigger when I sync a Quote with the Opportunity. How can I access the related QuoteLineItem? I looked at the "Custom Quote ...
jpmonette's user avatar
  • 4,440
4 votes
2 answers
798 views

How to count OpportunityLineItems left in an after delete OpportunityLineItems

I have a trigger on the OpportunityLineItem acting after delete. From that trigger, I want to query all the Opportunities associated to the OpportunityLineItems deleted to see if they still have other ...
jpmonette's user avatar
  • 4,440
4 votes
2 answers
1k views

How would one track field history for OpportunityLineItemSchedules?

Unforntunately Salesforce does not support Field History for OpportunityLineItemSchedules. A workaround would be to duplicate Salesforce's Field History object and update it using a trigger. (I have ...
MWH's user avatar
  • 41
4 votes
1 answer
382 views

OpportunityLineItems - why aren't they sent to trash can?

Question above.. Why not let the IsDeleted field apply to if the Opportunity Product is deleted from the parent Opp?
chowes's user avatar
  • 197
4 votes
0 answers
190 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 ...
Venkataraman's user avatar
4 votes
1 answer
964 views

Mass update OpportunityLineItem UnitCost (SalesPrice) [closed]

I have this issue every year.... We use opps to keep track of our renewable business year on year. The renewal opp is created automatically when the previous opp is closed/won. A product is created ...
Antony Robinson's user avatar
3 votes
1 answer
6k views

Where does this List price come from in opportunity Products

There is a field called list price in opportunity Product. From where does this field get populated from? EDIT : From the documentation Corresponds to the UnitPrice on the PricebookEntry that is ...
Prady's user avatar
  • 12.3k
3 votes
3 answers
7k views

Change Opportunity Currency after adding a Opp Line Item

We have enabled multiple currency in our org, and allow the user to set the currency on the Opportunity record. The user is able to change the value of the Currency field on the Opportunity object if ...
Anup's user avatar
  • 3,810
3 votes
1 answer
17k views

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

Could some body please help me on this? I am improving test coverage and below is my code: static testmethod void opportunityLineItem_Test(){ Id priceBookID = Test.getStandardPricebookId(); ...
javanoob's user avatar
  • 8,907
3 votes
2 answers
1k views

Why can't the Opportunity amount be changed by a trigger?

I have more than one discount field in opportunitylineitem, so I created a custom field that sum all opportunity products total__c. But I need see amount in forecasts, so I created a trigger that ...
lisyy's user avatar
  • 169
3 votes
2 answers
2k views

How to Ensure Some Users Always Add Products when Creating Opportunities

We've got several departments using Salesforce and while we'd like everyone to use products with opportunities we can't currently do this across the board. However, for the departments that do use ...
Ralph Callaway's user avatar
3 votes
3 answers
5k views

Where is PricebookEntry Object

i am following this link http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_erd_products.htm .In this ER diagram there is Pricebook2Id field on Opportunity Object but i can't see any ...
mathlearner's user avatar
  • 2,151
3 votes
3 answers
1k views

Summer'21: OpportunityLineItem always empty for QuoteLineItem. Now how to fill QuoteLineItem custom fields?

While performing regression tests on a Summer'21 sandbox, I noticed that custom fields were not filled in newly created QuoteLineItems. For many years, I have used the trick as described here, and ...
Sander de Jong's user avatar
3 votes
1 answer
3k views

What access is required to query for OpportunityLineItems

I have an API user that pulls data from Salesforce to an external system. i only want to give them the access to the fields and objects that they need for security. I need to grant them the ability ...
Dan Wooding's user avatar
  • 3,597
3 votes
1 answer
2k views

Price Book Access Control?

Is anyone aware of a way to control access to Price Books? I'm finding no joy either here on SE or via Google. Our company previously had price books for each "country region" (like North America, ...
AMM's user avatar
  • 4,704
3 votes
2 answers
2k views

OpportunityLineItemschedule deletion problem?

We are using the custom product scheduling in our organization. When I am deleting the existing schedules its also updating the OpprtunityLineitem's quanity, salesprice and unitprice to '0'. Where as ...
Keepcalmncode's user avatar
3 votes
1 answer
1k views

How can I add Custom Fields that I need to be included in Opportunity Field History when they are changed/updated?

Right now I have Budget fields, say Budget Field 1, 2, and 3. When I update these budget fields, Opportunity Field History does not capture the updated information that was input into these fields. ...
Skobiwankanobi's user avatar
3 votes
1 answer
2k views

Using multiple pricebooks in an opportunity

When adding products to an opportunity I can only use one pricebook. In my case I need products from multiple pricebooks. How can that be done?
Dedo's user avatar
  • 5,017
3 votes
1 answer
2k views

Related List on OpportunityLineItem

I'm looking at something using QuoteLineItems and OpportunityLineItems. The quoting/selling application is only interested in seeing high level "summary" products; however, there is a need to be able ...
Peter Knolle's user avatar
  • 29.1k
3 votes
1 answer
2k views

Why can't I reference all Opportunity Product (OpportunityLineItem) fields in formula fields?

Salesforce's Spring '21 release finally offers Opportunity Product (OpportunityLineItem) lookups, which my organization has been waiting a long time for. However, we're having issues with our ...
Daniel Long's user avatar
3 votes
1 answer
798 views

Insert OpportunityLineItem - 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 ...
Marc Zaharescu's user avatar
3 votes
1 answer
584 views

Determine via Apex if product schedules are enabled for an Org

For a given Organization, how can I determine if it has the Product Schedule feature enabled without adding a dependency on that feature to a managed package? In the UI under App Setup > Customize > ...
Daniel Ballinger's user avatar
3 votes
1 answer
2k views

Using Product standard price in Custom Object

I'm trying to create a classic Invoice by using Custom Object Invoice (Master) Invoice Line Item (Detail) Invoice_Line_Item should have a look up relationship with Product. Also it has to include ...
Martin Borthiry's user avatar
3 votes
1 answer
1k 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 ...
RajeshShah's user avatar
  • 1,754
3 votes
2 answers
2k views

Updating Opportunity Product field when Roll-Up Opportunity field is changed

Can anyone please help with a possible solution? I have a Workflow on the Opportunity Products (Opportunity LineItems) that has one significant issue, which I can't workout how to solve. The ...
Jonny's user avatar
  • 45
3 votes
2 answers
4k views

Cannot find product to add to Opportunity

I have crated few products. Now I cannot find them when I am trying to add them to the Opportunity. Products are active. They are added to a Price Book. Price Book is also active. Any idea what is ...
Guddan's user avatar
  • 151
3 votes
1 answer
290 views

How to make a field on Opp Line item searchable

we are using Opportunity Products and pricebooks. So we have different line items on an Opportunity. Every line item (opp product) has an autonumber and other unique entries. Is it possible to make ...
tanja's user avatar
  • 31
3 votes
1 answer
368 views

How-to: Package products as a single product - AKA - CPQ

I have received a request from Sales/Marketing: They need to package several of the products we sell as a single product/Combo - and give it a promotion price for a certain period. It's an addition ...
Saariko's user avatar
  • 5,610

1
2 3 4 5
7