Given that you are storing a list of numbers in a delimited string field, "24; 35; 67", you have exactly two options. One is iteration (a loop); the other is recursion. You do not have the option of using aggregate queries or roll-up summary fields because you don't have actual number fields to look at.
Apex does not natively support a reduce() function, a ...
Journey Builder does not support the use of lists created in the Salesforce Marketing Cloud Email application. As a workaround, you can create a journey specific data extension from publication list via query activity. Run a query on publication list and populate the data extension. You can use this data extension as an entry source for your journey and then ...
Since StartDate__c is not unique, then you have one of two choices:
Use a unique key (Id, or other field)
Change your map to handle many records per one key
Since you seemed to suggest that doing #1 led to CPU time limits, I'd suggest changing your map to hold a list of Gear or Tool objects. Example for tool below assuming that StartDate and your EndDate ...
For Question #1
//I'm getting here null if it's null, or nothing, even if there is a correct value:
For the question about the System.debug issue, I can't answer that specifically as I don't know what field type it is (though I suspect it is a Number field), or what your data looks like, but the most likely scenario that I ...
Set in Apex doesn't rely on Id value for duplication reduction. You can add multiple records with same Id in a set if there is a difference between the values for those records.
Account acc1 = new Account(Id='001000000000001AAA');
Set<Account> accSet = new Set<Account>();
acc1 = new Account(Id='001000000000001AAA', Name='...
You are getting this error because you used Set<SObject> without fully understanding the mechanics of it, which is why I usually recommend against this structure entirely. Instead, you should use Map<Id, SObject>. For the former data structure, you only get deduplication if every field matches. For the latter data structure, you get deduplication ...
This error indicates that a DML update is being performed on some List<sObject>, and the relevant list contains the same object multiple times.
Scanning through updateRelationships(), the proximate cause is this line:
which is performing an update on a List<CaptureCard__c>. The better, and more typical, pattern is to ...
Loop Through the Array of JSON using forEach()
I used hasOwnProperty() to check the property in Object
Use the condition operator to check the key present in an object(output).
Below is the code I changed, Please see codepen