I want my users to be able to click on the “+” sign in a calendar (month) view and create a new record in my model for that day. One of the fields that needs to be populated is a lookup to a record that corresponds to the date they selected. The user shouldn’t have to re-select the date, though, so how do I pre-populate that field in my pop-up with the date that was clicked on?
Actually, what I really need to do is render the page differently based on the date chosen. I’m thinking I may need to pass the date into the popup and use an include page there to access other models based on that date (& other context/user info I can get, like the class). That seems to get me where I really need to be.
var params = arguments, $ = skuid.$, chosenSFDateTime = params.event['Date_Time__c'], chosenJDateTime = skuid.time.parseSFDateTime(chosenSFDateTime); chosenSFDate = skuid.time.getSFDate(chosenJDateTime), sdModel = skuid.model.getModel('SessionDay'), sdDateCondition = sdModel.getConditionByName('SessionDayDate'); sdModel.setCondition(sdDateCondition,chosenSFDate); sdModel.updateData();