I have a calendar page that has a custom popup (when you click on the title of an event) that has an included page. Everything works fine when logged in as a SF standard user. When I login as a portal user and load the include page by itself it works fine. However when I try to use the calendar page and load the popup, I just get “Loading…” forever. The popup page does have some javascript that executes upon loading as a popup, so my guess is that has something to do with it, but I don’t know why it wouldn’t work in the portal. Here’s the javascript code:
// this code gets all enrollment records for the class // then creates new workshop attendance records in the model for this workshop if there aren't already such records for each enrollment // it should execute upon loading of the page/popup (function(skuid){ var $ = skuid.$; $(function(){ $(document.body).one('pageload',function(){ var models = skuid.model; var workshopRow = models.getModel('WorkshopDetail').getFirstRow(); if(workshopRow.Today__c >= workshopRow.Date__c) // only fill attendance if the workshop date is today or previous { var enrollments = models.getModel('StudentEnrollment'); var attendances = models.getModel('WorkshopAttendance'); var workshopID = workshopRow.Id; var existingAttendanceIds = {}; $(attendances.data).each ( function(i, at) { existingAttendanceIdstat.Student_Enrollment__r.Id] = 1; } ); $(enrollments.data).each ( function(i, el) { if(existingAttendanceIdstel.Id] === undefined) { //add new row to table var newRow = attendances.createRow ({ additionalConditions: C { field: 'Student_Enrollment__r', value: el}, { field: 'Makeup_Session__c', value: 'No'}, { field: 'Student_Enrollment__c', value: el.Id}, { field: 'Workshop__c', value: workshopID} ], doAppend: true }); skuid.component.getById('workshopAttendanceTable').render(); } } ); } }); }); })(skuid);<br>