A method is passed a list of generic sObjects as a parameter. What should the developer do to determine which object type (Account, Lead, or Contact, for example) to cast each sObject?
A.
Use the first three characters of the sObject ID to determine the sObject type.
B.
Use the getSObjectType method on each generic sObject to retrieve the sObject token.
C.
Use the getSObjectName method on the sObject class to get the sObject name.
D.
Use a try-catch construct to cast the sObject into one of the three sObject types.
getSObjectType returns the object token, which also then has to be mapped to a name, so both are correct but can not be used without further modification.
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.
tapasroy
Highly Voted 2 years, 7 months agoTDB97
Most Recent 5 months agoTDB97
5 months agojagatpsingh
12 months agoBeatrizBernardo
1 year, 5 months agoJustMe99
1 year, 6 months agonibbler
1 year, 6 months ago