Quiz #3
1. What is the best approach to create an autonumber field like "2018/12-1"({Current_Year} / {Current_Month} - {Sequence_Number})?
- Create a formula field
- Create a custom field and implement a process builder
- Create a custom field and implement an apex trigger
- Create an autonumber field with the display format "{YYYY}/{MM}-{0}"
Reveal answer
Close
The Answer is D.
You can create an autonumber field with the specified display format. A Display Format allows you to control the appearance of the Auto Number field. A Display Format consists of the substitution variables described below, plus any other characters you wish to include as a prefix or suffix.
Examples
|
2. How many different sObject types you can create using one DML call?
- 1
- 5
- 10
- 150
- Unlimited
Reveal answer
Close
The Answer is C.
You can create records of up to 10 object types in one call. If the sObject array contains more than 10 chunks, Salesforce will throw the exception: "Cannot have more than 10 chunks in a single operation. Please rearrange the data to reduce chunking."
Let's see how Salesforce determines the number of chunks. You have a list with 10 items: account1, account2, contact1, account3, contact2, lead1, lead2.
Salesforce splits the records into five chunks:
1. account1, account2
2. contact1
3. account3
4. contact2
5. lead1, lead2
As you can see, a chunk is a subset of the input array, where each chunk contains records of one object type. I recommend you to use a sort method, that will rearrange records by object types, for example above you will have only three chunks. You need to make additional calls for processing more than 10 chunks.
3. How many fields can be tracked in the Field History Tracking?
- 20
- 25
- 50
- 500
- Unlimited
Reveal answer
Close
The Answer is A.
You can track up to 20 standard and custom fields per object. For additional information about Track Field History see Track Field History for Standard Objects, Track Field History for Custom Objects.
Comments powered by CComment