Hot answers tagged

3 votes

How to add many values at once in Apex?

You can initialize list with your items: List<String> l = new List<String>{'a', 'b', 'c', 'etc'};
user avatar
2 votes
Accepted

how to assemble a map that has a list inside

You'll want to iterate over the list, and then add items to the map. There are a couple of ways to go about that, but the generally accepted "best practice" is as follows: // First, you need ...
user avatar
  • 46.4k
2 votes

When I would change a formula, then when the value from that formula will change?

Formula fields do not have their values stored, they are calculated on-demand. Every time you query a record in Apex or view a record in a web browser, the formula fields are re-calculated. So there ...
user avatar
  • 46.4k
1 vote

TLS/SSL Configuration Vulnerability Issue in Salesforce App exchange Security Review

I faced the same issue during security review. In my case, I included a hyperlink to our website. Our website uses encryption (starts with https://...) but the server that hosts the web site accepts ...
user avatar
1 vote

Validate records by date ranges in SOQL and apex en bulk

Finding overlapping dates is one of those things that you think should be easy, but is actually hard. I mean, sure, it's easy enough to tell if two date ranges overlap or not (just see if the start or ...
user avatar
  • 46.4k
1 vote

Apex REST API call throws 401 error, status: token expired or invalid

You cannot do something without having necessary information which requires it to do what you are trying to do. tldr; You cannot decode JWT token without its keys (unless JTW is just signed and not ...
user avatar
  • 1,339

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