D
dubosegriffin
Guest
So here is the scenario. I have a trigger on object 1 that creates records on the object using javascript. Here is an example: if({!kickoff}){ var g = new Array(); g["name"]="01-Kickoff"; g["R8666824"]={!id}; g["total_budget"]=parseInt(2); g["default_milestone"]=true; var newId = rbv_api.createRecord("milestone3", g); } I then have another trigger on object 2 that creates record on the object 2 based on the creation of the record on object 1. Here is the script on the second trigger. var name = '{!name#text}'; var def = '{!default_milestone#value}'; var product = '{!R8666824.product#code}'; if (def == "true"){ if(name == "01-Kickoff"){ var a = new Array(); a["name"]="Kickoff Call"; a["R8666857"]={!id}; a["R8666835"]={!R8666824.id}; a["estimated_time"]=parseInt(2); var newId = rbv_api.createRecord("pm_task", a); } The problem is that I have the trigger on object 1 creating 20 records, and the trigger on object 2 creating 40 records from the object 1's 20 records. For some of the object 2 records, there are more than one record created for one object 1 record. The problem is that some of the object 2 records are not created and it is totally random. The start of this process is a checkbox field. If I check all the checkboxes, to create all records for object 1, all object 1 records are created, but not all object 2 records are created. If I select only a few of the object 1 checkboxes creating 5-10 obecjt 1 records, all of the expected object 2 records are created. There is either something going on with a timeout, or I also read that there is a limit on the number of secondary triggers that can run off a primary trigger. There are only 2 triggers involved here. When I use the trigger debug I get the the "too many triggers" error. Thanks for any insight.
Continue reading...
Continue reading...