exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 34 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 34
Topic #: 1
[All Certified Platform Developer II Questions]

A company represents their customers as Accounts that have an External ID field called Customer_Number__c. They have a custom Order (Order__c) object, with a Lookup to Account, to represent Orders that are placed in their external order management system (OMS). When an order is fulfilled in the OMS, a REST call to Salesforce should be made that creates an Order record in Salesforce and relates it to the proper Account.
What is the optimal way to implement this?

  • A. Perform a REST GET on the Account and a REST POST to update the Order__c with the Account's record ID.
  • B. Perform a REST PATCH to upsert the Order__c and specify the Account's Customer_Number__c in it.
  • C. Perform a REST POST to update the Order__c and specify the Account's Customer_Number__c in it.
  • D. Perform a REST GET on the Account and a REST PATCH to upsert the Order__c with the Account's record ID.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
santo_aj
3 months, 3 weeks ago
Selected Answer: B
B is Correct. Body example: { "Name" : "Order name", "Price__c": "100$", "Account__r" : { "Customer_Number__c" : 123 } } Reference : https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_upsert.htm
upvoted 2 times
...
cPickle
4 months, 1 week ago
Selected Answer: B
B is Correct. Reference : https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_upsert.htm
upvoted 2 times
...
thneeb
6 months, 3 weeks ago
B. is wrong. The lookup to Account needs a Salesforce Record Id and not an External ID. A is correct
upvoted 1 times
Segre
5 months, 3 weeks ago
actually, you can use external id, https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_upsert.htm
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago