Skip to main content
9 events
when toggle format what by license comment
Jun 13 at 12:36 answer added Nitesh Napit timeline score: -1
May 11 at 15:28 comment added Madan Nanoopillai Thanks Derek for the comments, Sorry for the confusion my words have created. My criteria is this, 1. Create a new record only if end dates in the already existing records are not blank. 2. Create a new record if no records already exists in the object as well, 3. the new record can have a blank end date. I am new to Apex,.
May 11 at 15:05 answer added sfdcfox timeline score: 0
May 11 at 14:34 comment added Derek F Are these GA_Declaration__c records related to another type of SObject? Are they occasionally deleted by some other process (if not, then your trigger would always result in an error except for the very first time you insert records in your org).
May 11 at 14:34 comment added Derek F I think that going into more detail about the conditions you're trying to work with is important. Your words also contradict your code (you say you can insert records with a blank end date, but your code says you reject everything if there's an existing record). You don't (or rather, can't) insert the same records that you're processing in a before insert trigger (nor in an after insert trigger).
May 11 at 14:25 history edited Derek F CC BY-SA 4.0
Fixing formatting (removing intro and outro), re-tagging with more relevant tags
May 11 at 14:22 history edited Madan Nanoopillai CC BY-SA 4.0
added 56 characters in body
S May 11 at 14:18 review First questions
May 11 at 15:25
S May 11 at 14:18 history asked Madan Nanoopillai CC BY-SA 4.0