Javascript .getMonth() method isn't working anymore


This is probably the case, but can you check to see if ACH_Next_Debit_Date__c is a date and not a date-time object? The skuid.time.parseSFDate will fail if given a date-time, and then you’d get the error message you saw about .getMonth not being a function. You might also check the permissions associated with that field and the account object. To further investigate your problem try these steps in the developer console (if the console commands don’t work and you’re on Chrome you’ll have to switch to firefox or take away your salesforce header and footer, it’s a problem documented in this post). To get to console in Chrome right-click your page and click inspect, and to get to console in Firefox right-click and click inspect element.

date = skuid.$M(‘Loan’).data[0].ACH_Next_Debit_Date__c;

This pulls the value of ACH_Next_Debit_Date from the first row of the Loan model, and you should see a date here. The next step is

sdjs = skuid.time.parseSFDate(date);

Now you should see a more human readable form of the date. Lastly, ask for sdjs.getMonth(); and you should get a number back. These steps will help you determine if the Next_Debit_Date field has data in it and if you have access to it. Here’s a screenshot of what my console looked like after testing: