How to Check for 0 Results in VisualForce
Checking if a list is null and has no results is pretty easy. The best way to do this is to use the ISNULL operator and and to check if the results has a size that isn’t 0.
Checking if a list is null and has no results is pretty easy. The best way to do this is to use the ISNULL operator and and to check if the results has a size that isn’t 0.
When we create Visualforce pages in Salesforce we have a few different ways that we can architect the code that will do any business logic that we need.
API is an acronym for Application Programming Interface. An API is a way for two applications to talk to one another. I like to think of an API as a data pipe that connects two systems together. Probably most software and hardware you are using uses an API because the server has to talk to…
Self-hosted WordPress sites often attract a lot of comment spam which requires your valuable time or resources to reduce to more manageable levels. We recommend automatically turning off commenting on older posts, because these are the posts that often rank very well in Google which attracts the spammers in the first place. Most blogs choose…
SQL Server Reporting Services is an excellent tool for controlling the output of reports and having reports created dynamically and even emailed to users. On all reports, I generally try to add a header and footer that will allow the users to quickly see the details of the report. Generally, it’s a great idea to…
For a client, I took on some very old ASP code that desperately needed some TLC before the site relaunches. While working on the project I had to convert an old Access 2000 file to a MySQL database. I found a free exe that met all of my needs for the conversion and safely moved…
When I first heard of Zen Coding on Sitepoint, I figured it was some other gimmick that might save me about 0.01% of my time each year after I spend five or six hours learning the syntax. Zen Coding works by expanding some abbreviations into properly closed html. The syntax is very simple, and can…
Computers have interested me virtually my entire life. I don’t remember when I got my 1st computer, I remember my dad and mom taking about how my dad would play computer games or use a bbs and have me sitting in his lap. Around the time I was six my dad was given a computer…
When I was looking at a site with the Chrome Developer Tools, it had a little error icon that said “Resource interpreted as other but transferred with MIME type text/javascript” when I clicked it. I couldn’t figure out my error at first, but eventually realized I had for some reason had a script tag with…
On LinkedIn, I noticed a question that didn’t really have any answers or additional comments. “If I write clean code, do I need comments?” was asked by the user on the discussion board.
In an ideal world, you wouldn’t need to write comments, but we don’t live in an ideal world.I think that you still do need some comments, but that the number and frequency of comments should significantly decrease.
I spend a significant amount of my timing deal with ecommerce and different shopping systems. One of my all time favourite solutions is using PayPal and Magento together because they have been designed from the ground up to interact well together. International Acceptance PayPal is accepted in many countries and is capable of doing automatic…
Very often, I need the date of some data and do not like to convert the date to a varchar and then proceed to format it or convert it back to a date. One of the official Microsoft sanctioned ways is: SELECT DATEADD(dd,0,DATEDIFF(dd,0,GETDATE()))
WAMP Server generally runs fine without any problems, although sometimes we have to make some configuration changes because of other software monitoring ports. Skype, for example, is commonly using port 80 to communicate and stopping apache from responding. If you’re using WAMP and apache at the same time, you need to left click the WAMP…
Getting WAMP to run properly on Windows 7 isn’t very difficult as long as the permissions are properly set. Also, keep in mind that you may need to modify your windows firewall settings, and bit defender if you have it running. WAMP needs full administrator privileges which as you may be aware needs to be…
I had a very strange issue with a client’s installation of magento a few nights ago. The checkout page was completely blank and the apache error logs were completely empty. I tried all the usual fixes of looking at file permissions, updating the magento installation, checking for new modules, etc but none of these solutions…
Every few months, especially after a windows update, I find that SQL Server Reporting Services’ ReportManager just won’t load. There’s no errors, there’s nothing in the System Event Log or any reason that I can see for the reportmanager never loading. I usually end up out of frustration stopping the reporting services, stopping IIS, and…
Dates and DateTimes are difficult to deal with in most languages. The Date object is a datatype that’s built in the JavaScript language. In JavaScript, the biggest problem is that the browsers aren’t overly consistent in the way they have implemented the Date object and its APIs. …
As a freelance developer / consultant, I am regularly hired by clients that outsource software development and don’t have somebody that looks at the sourcecode for quality. Unfortunately, I am also stuck dealing with this legacy spaghetti monster code that is in serious need of refactoring.…
Getting information from the SQL Server system tables is relatively easy and can be a great way of checking whether you completed some task or whatever. I use the following query or some variant to see when I’ve done something or what I named it or whatever. SELECT name, create_date FROM sys.tables order by create_date