Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [orderitem]

The tag has no usage guidance.

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

ListPrice does not fill automatically on Order Products Selection layout

Whenever I add Order Products to an Order, they appear with empty ListPrices on the layout. Meaning that the field shows up but it is always blank. The Parent PriceBook and its entries are activated ...
user avatar
0 votes
1 answer
19 views

how to add product to reductionOrder from apex test class?

I created a testClass that inserts an originalOrder with a product of a quantity : 4. Then, i created a reduction order related to the OriginalOrder. Now, I tried to add product to the reductionOrder ...
user avatar
0 votes
0 answers
25 views

Is there a way to calculate taxes on Orders That come from a connected system?

The Background: We have an org that's connected to an external system (ERP). Some of our orders (due to business requirements) need to be inputted through our external system, then pushed to ...
user avatar
0 votes
0 answers
114 views

SOQL : Field not found but it exist

I am doing a simple query on orders but I get an error : Query: Select Id,(SELECT Id, OrderId, LineNumber from OrderItems) From Order Error: No such column 'LineNumber' on entity 'OrderItem'. If you ...
user avatar
  • 423
0 votes
1 answer
58 views

The default value isn't getting selected in the picklist

I have a picklist field named Reporting type in the Quote Line Item object, for which I have set the default value as "Performance Reporting" at the field level. And also, there are no ...
user avatar
0 votes
1 answer
313 views

Display record detail of child record in parent record's aura lightning component

I am designing a custom lightning component to display a list of OrderItem records in a tabular format on parent Order record detail page. The requirement is to display the record detail page of an ...
user avatar
0 votes
1 answer
65 views

I want to copy Order Products to Contract Line Items using Apex

I have a requirement of creating Service Contracts when Order is Approved and add Order Products inside to Contract Line Items in Service Contract. Following is the code I am using to accomplish what ...
user avatar
0 votes
1 answer
274 views

INSUFFICIENT_ACCESS_OR_READONLY Error on Order Items deletion, even though I am System Administrator

Even though I have a System Administrator profile assigned to me, and have the CRUD permissions on the Order Line Item Object, I am receiving the below error when I try to delete the Order Item ...
user avatar
1 vote
1 answer
372 views

Check if "negative quantities" are enabled for Order Item using Apex

In Salesforce, there is a feature in Order Settings called 'Negative Quantities', which allows you to add OrderItems to an order with negative quantities. I am writing a script that syncs orders from ...
user avatar
  • 186
0 votes
1 answer
2k views

Single SOQL query to list ALL Products with ALL Quote Line Items and ALL Order Products?

While both Quote Line Item and Order Product have a lookup fields to Product, no relationship name is shown in Workbench. Further digging indicates a somewhat hidden PriceBookEntry object exists in ...
user avatar
0 votes
1 answer
168 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 ...
user avatar
1 vote
1 answer
162 views

Error when I try to create OrderItem records Insert failed. INVALID_CROSS_REFERENCE_KEY

I'm trying to create a visualforce page where a user can create multiple OrderItem records at the same time. The error that I get is OrderItem records Insert failed. First exception on row 0; ...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
0 votes
1 answer
2k views

Writing test class for order activate. Error: Required fields are missing: [PricebookEntryId]: [PricebookEntryId]

I've written a test class for order update, though I am stuck at some minor issue which I am unable to get through. My test class looks like: @IsTest public class TestCreateMyOrder { static ...
user avatar
  • 133
1 vote
0 answers
39 views

Orderitems Javascript Button replacement for Lightning

Currently I have the following as a javascript list button that allows the user to selected records: {!REQUIRESCRIPT('/soap/ajax/29.0/connection.js')} var selectedRecords = {!GETRECORDIDS( $...
user avatar
  • 11
1 vote
1 answer
966 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 ...
user avatar
  • 219
2 votes
1 answer
165 views

Override the OrderItem standard Edit page for some Order recordtypes without a controller extension

It is well-known that OrderItem doesn't support record types so you can't vary the page layout based on recordtype like you can for most other objects. Given that OrderItem is a detail to Order, and ...
user avatar
  • 61.5k
1 vote
1 answer
1k views

Custom (re)ordering of legend/bar segments in Einstein Analytics

Question: Currently I can sort bar segments of a stacked column chart in asc/desc order or keep it unsorted. However I would like to sort them in a custom fashion like in the image. How to do it with ...
user avatar
  • 125
0 votes
1 answer
479 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 ...
user avatar
  • 1,074
5 votes
1 answer
2k 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 ...
user avatar
  • 327
3 votes
2 answers
2k views

INSUFFICIENT_ACCESS_OR_READONLY, when deleting OrderItems in Apex

I am currently working on a lightning quick action which will update OrderItems on demand from a specified quote. If an OrderItem has no corresponding QuoteLineItem, the line item will be deleted. ...
user avatar
  • 51
0 votes
2 answers
614 views

Order Product Validation Rule

Is it possible to add a Validation Rule to Orders which checks a certain product name has been added to the order? Basically the price book includes products a, b and c. If the user selects a ...
user avatar
0 votes
3 answers
1k views

Create Asset record from data on OrderItem and OpportunityLineItem records

Scenario: When an Opportunity is closed/won, we are creating an Order record with the corresponding OrderItem records based on the OpportunityLineItems of the Opportunity. When the OrderItems are ...
user avatar
  • 73
2 votes
0 answers
539 views

OrderItem does not have ListPrice set in test, contrary to non-test

This is something I've run into and worked around, but it still annoys me because I have to write test specific things in my non-test code (and can't get to 100% coverage because of it). I can find ...
user avatar
  • 383
1 vote
2 answers
918 views

OrderItem doesn't have a recordtype, so how can use different page layouts depending on Order rectype?

I have different recordtypes for the Order object, and the line items (OrderItem) need to show different fields depending on the Order recordtype, yet I can't seem to do this. It allows me to create ...
user avatar
  • 1,387
0 votes
1 answer
82 views

OrderItem Creation via Enterprise wsdl call

I am trying to create via Enterprise WSDL create call an OrderItem record related to an order. As per image below, inside my call i pass the OrderID, the PriceBook ID, Quantity and Line Description, ...
user avatar
0 votes
0 answers
63 views

Products to opportunities, and the SortOrder field

While adding products to an opportunity in Salesforce, you can not specify the values for the 'SortOrder' field on Opportunity Line Items. That is very weird, and is a feature requested more than 7 ...
user avatar
1 vote
2 answers
2k views

How can I provide a partner user access to a report with order product fields?

I have a report with Order and Order Product fields in it. The Partner Communities user has read permission to both Order and Order Product and no problem viewing them outside of reports (eg: in a ...
user avatar
  • 375
4 votes
0 answers
95 views

How to use Reduction Orders with decimal / non-integer quantities?

I'm considering using Reduction Orders to model the partial refund of an annual service. Example: Create and Activate new Order A with one line, Quantity = 1, Price = $15000 Create and Activate ...
user avatar
0 votes
1 answer
536 views

Delete OrderItem Error

When I try to delete an OrderItem from an Order, I am getting a DML Mixed Exception. However, I am not updating any other object. Am I missing something? @istest private class ...
user avatar
  • 37
1 vote
1 answer
113 views

Adding Field Set for Order Item

I am trying to add a field Set for OrderItem object but I can't see any way to do so. Is field Set not supported for Order Item? If not, then what could be the other way to have dynamic fields?
user avatar
  • 21
0 votes
1 answer
2k views

ORDER BY a String which contains a number [duplicate]

I'm trying to 'ORDER BY' a String field which contains numbers. It orders like this: 1 10 2 3 ... I've tried whith LPAD, VALUE, *1, but nothing works. THANKS all for ur help!
user avatar
  • 143
0 votes
1 answer
153 views

How to access OrderItems that are in a related list on Opportunity

The related list on opportunities contains records of order items which usually have an account name associated with them. I have a requirement where if an opportunity's stage name is 'closed won', I ...
user avatar
  • 125
0 votes
1 answer
775 views

Not able to access TotalPrice in OrderItem

Trying to write trigger on Order item .I have created new field called discount.I have to perform formula using trigger on TotalPrice(TotalPrice=Discount*TotalPrice).I am not able to access TotalPrice ...
user avatar
3 votes
1 answer
517 views

Validation rule error messages not showing up on multiple entry Order Product page

I am working on Standard Order and Order Product objects. Here's the scenario: Restrict users from entering more than 100 Order Product items in Quantity on an Order. I've created a Rollup summary ...
user avatar
2 votes
1 answer
348 views

Approval Process for OrderItem Object in Salesforce?

Does anyone know how to create a approval process for Object Order Product(orderitem) object in Salesforce?I can't find the names in the list of objects in the approval definition screen or find any ...
user avatar
3 votes
2 answers
2k views

Assign Product to OrderItem

I am trying to create an orderitem from visualforce page and I am getting an error Attempt to de-reference a null object while assigning pricebookentry.priduct2Id.Here is my part of code where it ...
user avatar
  • 13.3k
4 votes
2 answers
3k views

INVALID_CROSS_REFERENCE_KEY, invalid cross reference id on Order Item Insert

I am getting the error "INVALID_CROSS_REFERENCE_KEY, invalid cross reference id:" while trying to insert an Order Item related to an order, by cloning the opportunity line item records using an Apex ...
user avatar
1 vote
1 answer
494 views

What's the the apex:relatedlist 'list' parameter for Order Product History?

I'm trying to add the 'Order Product History' related list for an OrderItem (aka 'Order Product') to a Visualforce page that uses 'OrderItem' as the standardController: <apex:page showHeader="true"...
user avatar
2 votes
1 answer
755 views

The Ominous INVALID_CROSS_REFERENCE_KEY Error on OrderItem Insert

So in an attempt to convert an OpportunityLineItem into an OrderItem, I get the mysterious and vague INVALID_CROSS_REFERENCE_KEY Error on insert of an OrderItem list. What's odd is my test class runs ...
user avatar
1 vote
1 answer
386 views

Field is not writeable: Order.IsReductionOrder

I am trying to update Order.IsReductionOrder to true from a trigger but getting below error. Field is not writeable: Order.IsReductionOrder It looks like field is read only from Order ...
user avatar
  • 13.3k
7 votes
2 answers
7k views

Product2 field in OrderItem Object

When I ran below query in workbench/developer console SELECT product2 FROM OrderItem am getting below error No such column 'Product2' on entity 'OrderItem'. If you are attempting to use a custom ...
user avatar
  • 13.3k
2 votes
1 answer
3k views

List controllers are not supported for Order Item

I am trying to create a custom EDIT ALL list button on OrderItem (Order Product) with content source as Visualforce page and am getting below error. I don't want to use standard EDIT ALL button as I ...
user avatar
  • 13.3k
1 vote
1 answer
578 views

List controllers are not supported for OrderItem

I am trying to do pagination for OrderItems using StandardSetController, however, when I am passing my query in setCon, I am getting following error. List controllers are not supported for ...
user avatar
1 vote
2 answers
518 views

How to make a order in salesforce using php

I'm tried to insert or create new order like product and shipping details in salesforce,but i got get the exact table name for create order please help me name of the table i need to use and what ...
user avatar
  • 113
2 votes
1 answer
12k views

Problem with Inserting a New Order Item

I am a certified admin and I am just beginning to learn code. I am currently trying to update several Order records to add a new Order Item and update the status on each record. My code worked in our ...
user avatar
  • 21
2 votes
2 answers
11k views

How can I query Orders to get OrderItems associated with that order

I see that there is a related list on Orders showing the OrderItems but there is not field on orders that I can SOQL query in Apex.
user avatar
  • 975