Tag Archives: Apex

Salesforce Knowledge Article

Knowledge Article Number Redirect

If you use the Salesforce Labs app for Public Knowledge Base then you’ve likely noticed the bulky URLs, something in the format of ‘/articles/Article-Type/Article-URL-Name’. This URL structure is great for SEO, but it’s not always necessary when sending a link directly to a colleague or customer. To make sharing articles easier, I created a Visualforce page […]

Business Days – The Missing Salesforce Function

Developer Samruddhi Patil recently asked the Twitter community about calculating business days in Salesforce. For example, if a case needs to be closed within 10 business days, what is the date does it needs to be closed? Much to our surprise, there does not appear to be any built-in functionality for handling such things. At […]

The ‘Spouse Situation’ and Avoiding Recursive Triggers in Salesforce

Suppose we wanted to track a Contact’s spouse or significant other in Salesforce using a lookup field to another Contact. This type of lookup is called a “Self Relationship” in Salesforce because the Contact object is relating back to itself. We normally use self relationships to establish a sense of hierarchy, like assigning sub Accounts […]