3 respuestas
Hi Florin,
+1 to AKG's suggestions. I would also suggest throwing a nice to read error when the condition is met not to create another budget record so your users stay informed and know why it's preventing them from creating the record.Information on adding errors can be found here:https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_sobject.htm-derhyk