Skip to main content
6 votes
Accepted

Can Platform License Users access the Standard Order Object?

Well yes and no, In Standard Salesforce UI, no. You cannot even assign Order CRUD via permission SET. In VF, APEX, Aura, LWC Yes. You have to use custom apex classes, triggers, and wrappers and get ...
Pranay Jaiswal's user avatar
6 votes
Accepted

Proper way to make Contract-Order, force 1-1 relationship

Yes, You can do that using standard Salesforce Functionality Create a Field on Order Named as Contract_Unqiue__c and make it as unique field. Create a WF rule on Order and when the order is created , ...
Pranay Jaiswal's user avatar
5 votes
Accepted

Order: Create a new Status Category

Status An indication of the stage that the order has reached in the order business process. You can add values to this picklist within two system-defined order status categories: Draft and ...
sanket kumar's user avatar
  • 15.6k
5 votes
Accepted

Get a basket instance for a profile in SFCC

In the documentation it is said "Restricted to agent scenario use cases: This method will result in an exception if called by a user without permission Create_Order_On_Behalf_Of or if no customer is ...
Zlatin Zlatev's user avatar
5 votes
Accepted

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

Pricebook entry is missing from test data. You need to create test Pricebook entry. PriceBookEntry stdPriceBookEntry = new PriceBookEntry(); stdPriceBookEntry.Product2Id=p.Id; //Product Id ...
Rahul Gawale's user avatar
  • 12.3k
4 votes
Accepted

Do Maps have an Reliable Relationship between keySet() order and values() order?

The order of iteration for both Map.keySet() and Map.values() are defined to be deterministic. From the Summer '15 Release Notes, Iteration Order for Maps and Sets Is Now Predictable: The order of ...
David Reed's user avatar
  • 93.7k
4 votes
Accepted

PROD v Test different: Deleting Accounts with Orders

Why is this important? Well, if you're writing a testmethod that is attempting to test partial success saves on Account deletion, you can't just mock Accounts and draft Orders, you need a different ...
cropredy's user avatar
  • 73.3k
3 votes
Accepted

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

I believe you request payload is correct, the URI is wrong. According to Salesforce SObject Tree, you need to send request to /vXX.X/composite/tree/SObjectName which in your case will be https://ap4....
manjit5190's user avatar
  • 8,073
3 votes

Deduct from Record(s) on a "First in, First Out" Basis when multiple records created simultaneously - How does SOQL handle this with ORDER BY?

The best way to order by insertion order and also avoid records that have the same ordering value (as can happen using CreatedDate) is to add an auto-number field and ORDER BY that (with or without ...
Keith C's user avatar
  • 137k
3 votes

Software as a service

CPQ simply adds an extra layer of features to the objects already present in Salesforce. You can enable Orders, Reduction Orders, and Quotes without CPQ. You'll find them available in the Setup menu ...
sfdcfox's user avatar
  • 502k
3 votes
Accepted

Map changing the order of key value pairs in apex

Maps are unordered collections, and may be organized in any order. Note that Iteration Order for Maps and Sets Is Now Predictable causes the values to be displayed in a consistent order, which is why ...
sfdcfox's user avatar
  • 502k
3 votes
Accepted

How can I order the Fields of the Custom Settings with Sort() method?

In order to use list.sort() with custom types, they must implement Comparable Interface, that define only one method: Integer compareTo(Object compareTo). foo.compareTo(bar) should return the ...
RubenDG's user avatar
  • 9,582
3 votes

How to only select orders, where orders contain orderitems

A query can do this (only return records with >= 1 child record) through a few different methods: Use a semi join Have a rollup summary field (on Order) that counts the number of order items, and ...
Derek F's user avatar
  • 64.1k
2 votes
Accepted

Deduct from Record(s) on a "First in, First Out" Basis when multiple records created simultaneously - How does SOQL handle this with ORDER BY?

According to the Force.com SOQL and SOSL Reference on the ORDER BY clause: You can use ORDER BY in a SELECT statement to control the order of the query results. There is no guarantee of the order ...
Adrian Larson's user avatar
  • 151k
2 votes
Accepted

How to set the status on Order to "Activated" in Test Code

Here's what worked for me. 1) I created the Order with a Status of "Draft". Order order = new Order( Name='Test Order', AccountId = testAccount.Id, Status='Draft',...
Arthlete's user avatar
  • 5,039
2 votes
Accepted

Iteration Order in Ordered List

I recommend you just use aggregate queries here. You can then get just one row for each mapping you're trying to create. You could even do the nifty alias to Id trick so you can use the built in Map ...
Adrian Larson's user avatar
  • 151k
2 votes

Order Product Validation Rule

An alternative to DLRS is to do the following: Create a custom field on OrderItem called Product_Name__c Create a workflow that populates OrderItem.Product__c with the value of OrderItem....
cropredy's user avatar
  • 73.3k
2 votes
Accepted

Order Product Validation Rule

You should be able to add the product name as a criterion in any rollup helper tool. I am most specifically familiar with Declarative Lookup Rollup Summaries, which is certainly capable of crafting ...
Adrian Larson's user avatar
  • 151k
2 votes

How to filter the products that can be added to an Order?

Orders can be implemented in a number of different ways. Some orgs will use Opportunity to create a Contract and then create Orders against the Contract. One can associate a Price Book with a Contract ...
crmprogdev's user avatar
2 votes
Accepted

The picklist field in the VF form is not showing up in the Confirmation page and getting inserted incorrectly in Order Detail page

For the first error with the wrong time, you set the minutes using the hours variable. Here's the right code: order.First_email_reminder_time__c = (selectedREMFirstEmailHours==null ? '00': ...
Martin Lezer's user avatar
  • 7,294
2 votes
Accepted

Distribution of Salesforce Platform License for AppExchange App

Closing this question as I forgot about it but got the answer. Hope it might help some other people maybe later. My understanding is that when submitting an order using the Channel Order App, the ...
P. Lapointe's user avatar
2 votes

Get a basket instance for a profile in SFCC

This information can only be gathered from OCAPI with a business manager login: Example authentication request / response (I use sandbox client_id): POST https://iteliosXX-alliance-prtnr-eu07-dw....
Jesper's user avatar
  • 121
2 votes
Accepted

Different currencies in PricebookEntry throwing exception FIELD_INTEGRITY_EXCEPTION, PricebookEntryId (must have the same currency as the order)

I don't see you setting the currency of your new orders. Try adding orderNew.CurrencyIsoCode = qu.CurrencyIsoCode; after instantiation of a new Order object. The complaint is simply, that the used ...
Florian Heer's user avatar
2 votes
Accepted

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

So, this is available from the MetadataAPI in object OrderSettings enableEnhancedCommerceOrders boolean Indicates whether enhanced commerce orders are enabled for the org (true) or not (false). This ...
cropredy's user avatar
  • 73.3k
2 votes
Accepted

What are the actual effects of enabling Enhanced Commerce Order?

This setting just changes the fields on the cart / order objects to make them play nice with the rest of the LEX product. It is for overall compatibility with CPQ billing (For example without "...
Anudeep Gopagoni's user avatar
1 vote

How to create a related list for Orders associated with a Contact record that appears on the Contact page?

Ah yes, the OOTB lookup fields on Order that reference Contact are not supported by related lists because those relationship names don't exist in the schema: BilltoContactId CustomerAuthorizedById ...
cropredy's user avatar
  • 73.3k
1 vote

How to insert order and orderitems in single rest call in salesforce

I would do this using Salesforce composite API. . Composite api allows you to provide complex JSON for inserting/updating/deleting/searching different sobjects in the form of subrequests. It also ...
Pranay Jaiswal's user avatar
1 vote
Accepted

Is it possible to update Order Product on Draft Order?

In Salesforce, within any of the "line-item-y" detail objects (ContractLineItem, OpportunityLineItem, QuoteLineItem, OrderItem), the field PricebookEntryId cannot be updated For OrderItem, ...
cropredy's user avatar
  • 73.3k
1 vote

get Sales Order Line on Rest API

/services/data/v45.0/sobjects/Sales_Order_Line__c/ This is an sObject Basic Information endpoint. It provides you with core metadata about the object type Sales_Order_Line__c, not record content. If ...
David Reed's user avatar
  • 93.7k
1 vote

How do I activate an order in Lightning?

Lightning is apparently looking for a status of "Activated", not a status category of "Activated". Once I added a new status that literally said "Activated", the Activate button worked perfectly.
Paugh's user avatar
  • 305

Only top scored, non community-wiki answers of a minimum length are eligible