Make an editable grid refresh on email Drag & Drop – SalesLogix8
Posted By: Alex.Cottner on November 4th, 2013 in General
No Gravatar

I extended business rules for a customer to automatically create ticket activities when an emailed history record is associated with a ticket. This was done to mirror logic from their old LAN environment. However they pointed out that when they dragged & dropped an email onto a ticket the grid didn’t refresh automatically.

After investigating the NotesHistoryList I quickly discovered that I could inject this into my quickform without any hassle. The injection point here is the contextualCondition property of the editable grid.

this.onHistoryChanges = function (history) {
    this.refresh();
};
this.connections = [];
this.connections.push(dojo.subscribe('/entity/history/create', this, this.onHistoryChanges));
this.connections.push(dojo.subscribe('/entity/history/change', this, this.onHistoryChanges));

Now whenever a history record is added or an email is Dragged & Dropped in, the ticket activities grid will automagically refresh for the user (just like the Notes/History grids do).


Adding a Change Owner link to a Visualforce page
Posted By: Alex.Cottner on January 4th, 2013 in General
No Gravatar

We ran into an interesting limitation with VisualForce. It looks like when you use an apex:outputField on an owner field, the “Change” link doesn’t show up correctly. After searching through the SalesForce forums and some other blog posts I couldn’t find any solution that would work exactly like the standard Owner control works on a normal SalesForce page. The other solutions I found required having a separate “Change Owner” button, or using an output field. I wanted to keep this as close to stock as possible, so I figured the easiest thing to do would be to inject a “Change” link and park it right inside the outputField’s span.

Since this page already has some dojo code on it, I figured that would be the easiest route.
(more…)


Using Dojo in SalesForce
Posted By: Alex.Cottner on December 5th, 2012 in General
No Gravatar

Today we’re going to look at using Dojo, our beloved JavaScript framework, inside of a VisualForce page. We needed to do this for a customer recently to display a lot of data (several hundred fields) on a single page that could be easily navigated without a lot of postbacks. After a little playing with proof of concepts I settled on using Dojo inside a VisualForce page to get the job done. I have worked with Dojo quite a bit over the last year, however I had only built a couple small VisualForce pages. I was quite pleased to find out that SalesForce lives up to their promise with VisualForce.
(more…)


Adding Keyboard Input to Dojo Select Controls (dijit.form.select)
Posted By: Alex.Cottner on November 15th, 2012 in Dojo, General, Javascript
No Gravatar

I ran into a situation yesterday where I needed to extend the functionality of the dijit.form.select control so it could have proper keyboard input. Power users want to be able to tab through their forms and use the keyboard to get work done quickly. The stock select control from dojo only allows for use with a mouse and some pretty basic keyboard input. To change this, I just needed to override a couple methods on my controls and setup a new property.

Here is an example creating a new select control.
(more…)