Hot answers tagged

2

There's no nextUrl because of the LIMIT clause. If you need all fields without restriction, you need to do a describe call to get all fields, which you can cache for later use, then build a query based those results.


2

Well, you're getting an approximation of a person's age by only focusing on the year. If a Contact's birthday would be on December 31st, though, you'd get a result saying that they are one year older than they truly are. Maybe that's acceptable in your situation, but if it's not you'll need to add checks against the month and day as well (leading to you ...


2

Correct. Correct. In addition, you can also pass collections of primitives. Correct. Note that you're limited to just one call, rather than the 50 you'd get in synchronous code. Incorrect. You are allowed to call a (1) Queueable in a future method. You're also allowed to call (1) future method in other asynchronous code. Correct. Note that this isn't ...


1

There are multiple ways to do it Use Formula Field Use workflow (basis your business requirement whether on insert or insert and update) If you choose to do it with formula field, create a formula field with formula return type as Percent and click next Click on Advanced Tab on next screen and enter this CASE(Gender__c,'MALE',10,20) Save the field If you ...


1

Depending on the number of results, you can just write your query like this: SELECT DAY_ONLY(LoginTime), UserId FROM LoginHistory WHERE DAY_IN_WEEK(LoginTime) NOT IN (1, 7) GROUP BY UserId, DAY_ONLY(LoginTime) This will give you every day a user has logged in, not including weekends. The data type for these results will be an AggregateResult. Note that &...


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