AuthorNishant Bamb

Error with memcached in wordpress on windows localhost.


I was trying to setup my wordpress website,, on windows localhost & had really tough time solving memcache related issues. After 2 days of efforts, finally here is perfect solution: 1. Verify your PHP version matches the one which was for your live site. In my case, it was 5.3.x on live site but had 5.6 on my latest xampp local server. So I installed installed earlier...

Unable to Add as Partner for Person Accounts in Salesforce


Unfortunately from Spring 2012, Salesforce has disabled allowing Person Accounts to have access to Partner/Customer Portal or Communities 🙁 See the note here under Self-Service Portal: Or this: “Keep in mind that if your organization has person accounts, they can’t be used as partner accounts and you can’t create partner users that are associated with them. Only business accounts can be...

Timezone & Daylight Saving in Salesforce


This simple code will help you get the current time in any given timezone at any point of time:   Datetime GMTDate =; String strConvertedDate = GMTDate.format(‘MM/dd/yyyy HH:mm:ss’, ‘America/New_York’); system.debug(‘Time – ‘ + strConvertedDate); Gives exact current time in New York whenever you run this code.   Datetime GMTDate =...

How to call visualforce page in Salesforce1


Its pretty easy: <apex:page> <script> try {'/apex/myVFPage'); } catch(e) { window.location.href = '/apex/myVFPage'; } </script> </apex:page> But you would come to a problem eventually that the vf page where I wrote above code, suppose testSF1 … how do I call that page? Here is manual way: 1. Create new visualforce tab for this testSF1 page...

Buttons not working on visualforce pages in partner or customer portal. [solved]


Recently I came across this weird problem for which I couldnt find any help on Internet. I created a visualforce page having several buttons & input fields. Some of the buttons were redirecting to other pages & some doing processing on same page. This page when logged in from Salesforce were working perfectly, the buttons were behaving properly as supposed to but when accessing the same...

How to implement Paging in Apex Salesforce


Put this code in your class & replace your query for myRequestsSetCon: public ApexPages.StandardSetController myRequestsSetCon { get { if(myRequestsSetCon == null) { myRequestsSetCon = new ApexPages.StandardSetController(Database.getQueryLocator([ select Id, Name, Merchant_Name__c, Requested_Pricing_Change_Effective_Date__c, Status__c, CreatedDate from Global_Merchant_Pricing_Change__c where...