1 answer
Hello Mathias,First I hope you are doing this before insert of Event Object. To get the id of inserted Visit Report records:
I hope it will help you.trigger on event Create visitreport__c (before insert){
list<visitreport_c> visitreports = new list<visitreport_c>();
// bulkify business logic start
...
...
// bulkify business logic end
insert visitreports;
//but you have to handle it bulk update as well
for(visitreport_c vr:visitreports){
system.debug('Id:'+vr.id);
}
}