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 ...
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 , ...
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 ...
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 ...
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
...
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 ...
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 ...
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....
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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',...
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 ...
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....
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 ...
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 ...
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': ...
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 ...
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....
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 ...
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 ...
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 "...
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
...
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 ...
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, ...
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 ...
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.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
order × 140orderitem × 29
apex × 23
soql × 14
pricebook × 9
unit-test × 8
opportunity × 8
cpq × 7
visualforce × 6
quote × 6
product × 6
contracts × 6
map × 5
list × 5
sort × 5
pricebookentry × 5
trigger × 4
lightning × 4
query × 4
picklist × 4
custom-field × 4
licenses × 4
rest-api × 3
api × 3
reporting × 3