I am using this java snippet to load all contacts associated with an Account in a related object. All the contacts load great. I am able to make changes and save the records, Yah! The problem is when I refresh the page it loads all the contacts again, including the saved contacts, so you will see the same contact twice. Does anyone know what changes I need to make to the snippet to only load the contact once and still save the contact?
var params = arguments[0];var $ = skuid.$;<br />// Get references to our three important Models<br />var models = skuid.model.map();<br />var contacts = models.National_Programming_Contacts;<br />var proActions = models.NationalProgrammingActions;<br />var newAttendance = models.National_Programming_Attendance;<br />// Now, auto-generate a new Attendance record <br />// for each Contact in this Account.<br />$.each(contacts.data,function(){<br /> var row = newAttendance.createRow({<br /> additionalConditions: [<br /> { field: 'Contact__c', value: this.Id, operator: '=', nameFieldValue: this.Name }<br /> ]<br /> });<br />});