[VisualForce] Block Auto Focus on DatePicker

This little post is born to remember how to avoid auto focus on Visualforce page of a DatePicker field, in case it is the first “focusable” field in the page: //avoid autofocus on date pickers function setFocusOnLoad() {} This is something I have found online some weeks ago, but I can’t remember the original post. […]

[Salesforce / Visualforce] jQueryUI + Dialog + Postback

I wanna show you what happens if you do a postback inside a modal jQuery UI dialog. This is a problem I had some times ago making this challenge on Cloudspokes. We have a simple controller: public class MyController { public String value{get;set;} public void anAction() { if(value != null && value.length()>0) ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR ,’Variable […]

[Salesforce / Apex] POST Mutipart/form-data with HttpRequest

17/10/2014: the solution has been improved. Datails at the end of the post. Grandma says you cannot post a Mutipart/form-data using an HttpRequest in APEX? Well, if she says this now you can tell her this is no more true! All comes from a CloudSpokes challenge (here is the link)…at the time of starting the challenge […]