Skip to main content

Questions tagged [orderitem]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
21 views

Internal server error when adding products to Order

Given: User w/ Profile cloned from Minimum Access - Salesforce plus permission sets When: User creates an Order User adds Products to Order selects Product(s) and clicks NEXT expecting to see the ...
cropredy's user avatar
  • 72k
0 votes
1 answer
63 views

Custom Convert Quote to Order with child object

Hello I am new to Salesforce. I want to custom convert Quote to Order with Packaging Details for Order Item. Packaging_Details__c is the child object of QuoteLineItem and OrderItem objects, An item ...
Hmzkra's user avatar
  • 3
1 vote
1 answer
141 views

Problem with a validation rule in Order Item

Hey everyone I'm kind of a newbie in my journey in salesforce. And I'm kind of struggling with this one validation rule I'm trying to write. Now the thing is in Order Item there is the product code ...
dukefb's user avatar
  • 13
1 vote
1 answer
519 views

Access Product2 lookup from OrderItem object

I'm trying to access fields of the Product2 parent from the OrderItem and running into a strange error, "No such column 'Product2Id' on entity 'OrderItem'". The following string of code ...
Tony Kirumba's user avatar
0 votes
1 answer
462 views

How can I add fields to the default order Item list view?

If I click the "hyperlinked related list title with count" on the Order Items related list on my Order page / layout, Then it navigates to a default list of Order Items. How can I add/remove ...
RobD's user avatar
  • 404
-3 votes
1 answer
1k views

How to ad order items to order [closed]

How do I create an order with orderitems. The following code gives me error - Error CreateSummaryOrder Method does not exist or incorrect signature: void add(OrderItem) from the type Order (67:18) I ...
knay's user avatar
  • 37
0 votes
2 answers
658 views

How to only select orders, where orders contain orderitems

I have this query but it is returning orders where there a no orderitems present, how can i only select orders that have order items in them? SELECT EffectiveDate, Description, id, (select order.id ...
knay's user avatar
  • 37
1 vote
1 answer
495 views

What does "the order product has been reduced" mean?

We have been using Orders and Order Products for about a year in a really fundamental way, just to feed into a custom built Invoice object. It's recurring monthly Invoicing, so the values on the ...
Jerry Woods's user avatar
0 votes
1 answer
657 views

duplicate alias: name error while grouping

We are using bundle products in salesforce and I am trying to display the Order products in a PDF document which I am creating using VF page. In the Order detail page the Bundle products appear ...
Akshay Vasu's user avatar
0 votes
1 answer
137 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 ...
ViniVan's user avatar
0 votes
1 answer
351 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 ...
sabrina's user avatar
0 votes
0 answers
2k 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 ...
Raphael D's user avatar
  • 616
0 votes
1 answer
2k 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 ...
Akshay Vasu's user avatar
0 votes
1 answer
1k 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 ...
user51241's user avatar
0 votes
1 answer
489 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 ...
sheraz hassan's user avatar
0 votes
1 answer
1k 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 ...
Akshay Vasu's user avatar
1 vote
1 answer
908 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 ...
Rai's user avatar
  • 326
0 votes
1 answer
4k 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 ...
Alexis Kasperavičius's user avatar
0 votes
1 answer
342 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 ...
Jahnvi Jasani's user avatar
1 vote
1 answer
310 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; ...
Chandlerbeen's user avatar
0 votes
1 answer
3k 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 ...
Nilang Pandey's user avatar
0 votes
1 answer
3k 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 ...
Anant's user avatar
  • 133
1 vote
0 answers
52 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( $...
KarenM's user avatar
  • 11
1 vote
1 answer
2k 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 ...
Maya Tran's user avatar
  • 229
2 votes
1 answer
249 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 ...
cropredy's user avatar
  • 72k
1 vote
1 answer
2k 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 ...
ACP's user avatar
  • 125
0 votes
1 answer
1k 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 ...
Valyrion's user avatar
  • 1,144
5 votes
1 answer
3k 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 ...
rna7's user avatar
  • 347
3 votes
2 answers
4k 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. ...
Destiny's user avatar
  • 51
0 votes
2 answers
1k 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 ...
sfdc_beginner1's user avatar
0 votes
3 answers
2k 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 ...
Brandon's user avatar
  • 63
2 votes
0 answers
626 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 ...
Legolas's user avatar
  • 383
1 vote
2 answers
1k 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 ...
Irene's user avatar
  • 1,849
0 votes
1 answer
86 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, ...
Gabriele Kahal's user avatar
0 votes
0 answers
260 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 ...
Renato Oliveira's user avatar
1 vote
2 answers
3k 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 ...
donmac23's user avatar
  • 415
4 votes
0 answers
123 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 ...
Matt and Neil's user avatar
0 votes
1 answer
794 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 ...
Corey C's user avatar
  • 47
1 vote
1 answer
180 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?
Sandeep's 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!
Carloss's user avatar
  • 143
0 votes
1 answer
278 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 ...
Nik's user avatar
  • 125
0 votes
1 answer
1k 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 ...
Salesforce Learner's user avatar
3 votes
1 answer
656 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 ...
dipendu chanda's user avatar
2 votes
1 answer
548 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 ...
rony joseph's 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 ...
sfdc's user avatar
  • 13.7k
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 ...
Naveen Chugh's user avatar
1 vote
1 answer
542 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"...
Jason Hartfield's user avatar
2 votes
1 answer
886 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 ...
Programmable Medley's user avatar
1 vote
1 answer
675 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 ...
sfdc's user avatar
  • 13.7k
8 votes
3 answers
8k 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 ...
sfdc's user avatar
  • 13.7k