A field trip through lookup junction records editing on master - Part 3

Raghu Nallani Chakravartula
Now that the backend controllers and Apex code blocks are in place (with appropriate test classes, hopefully!), the VF page can be put together simply as an apex:form with a category filter, a table of recommendations data and a section for page navigation.
The save action on the form can be mapped to the extension to save the appropriate recommendations records by querying the changed recommendations cache.
Read More
Topics: salesforce.com, Apex Programming, How To, VisualForce

A field trip through lookup junction records editing on master - Part 2

Raghu Nallani Chakravartula

Continuing on from Part 1, where we defined a data structure to hold our recommendation junction objects, this part will focus on the state management required for the UI.  

Read More
Topics: salesforce.com, Apex Programming, How To, VisualForce

A field trip through lookup junction records editing on master - Part 1

Raghu Nallani Chakravartula
The number of clicks required to create a related list record against a master is tedious. It gets more complex if we require to pick and choose a number of the other parent records to create records against. somewhat like the opportunity product list where we create Opp- Products against the opportunity but by choosing the product to peg it against. 

Another example of this is the "Fund Recommendations List" on Accounts or "Selected Funds" on Opportunity etc from the Arxxus Solution for Fund Managers.

Let us discuss a technique to model this scalably using VF and Apex so that we are able to filter and paginate through tons of records to create required related records easily directly off the parent record. 

Read More
Topics: salesforce.com, Apex Programming, How To, VisualForce

Retrieving relationship between business hours and holidays using apex

Lalit Mistry

Salesforce provides a means to configure business hours and holidays in the system. Admin can setup business hours for their company by simply navigating to Setup -> Company Profile -> Business Hours. The business hour configuration ensures that the system is aware of the working hours and accordingly computes target date (such as SLA of cases) and helps you to provide the correct support to your customer.

Read More
Topics: salesforce.com, Apex Programming, Best Practices, Learning

Is parameter passing in apex really passed by reference?

Lalit Mistry

Yesterday I was having a discussion with one of my colleague over parameter passing techniques in apex programming. He was pretty sure that primitives in apex are passed by values, whereas non-primitive data types are passed by reference. Well, this statement is partially correct.

Read More
Topics: salesforce.com, Apex Programming, Best Practices, Learning

Overriding Object sharing model using Apex: an example

Raghu Nallani Chakravartula

INTRODUCTION:

While salesforce provides a comprehensive access control framework for objects and field access, sometimes we need to lock down access to certain objects completely, while allowing certain users to access and modify certain fields in certain records of such objects. This could either be because of restrictive business rules or because of the license types your users have. This post explores some intricacies of programmatically allowing users to access and work with such private objects. 

Read More
Topics: Apex Programming, Best Practices