Mapping the Resource Field in Salesforce

What is a resource?

Resource scheduling is one of the real strengths of DayBack calendar and I'd encourage you to check out some of the resource scheduling views here:  Resource Scheduling

A "resource" is anything in your org that can get over scheduled: a room, a person, a team, or even a business process. The resource views give you a dedicated row or column for each resource so that you can easily see which are overscheduled, which have gaps, and drag events from one resource to another.

The rest of this article describes which kinds of fields you can use for resources.

Owner.Name - the default for Events and Tasks

By default, DayBack will map resource to the Owner.Name field in your Event and Task objects. This works great for many applications since Salesforce doesn't permit multiple values for "owner", you can't have multiple values here, and you can't leave the owner blank (or drag and event to the "none" column in DayBack).

Since you can't have multiple values in an owner, you can approximate this by control-dragging or option-dragging an event or task to a new resource to create a copy of the event.

Supporting multiple values - text fields and multi-selection picklists

You can map the resource field to a long text field or to a multiple-selection picklist in order to allow  multiple resources for the same event.

Lookups and Related Records

DayBack can't map to a lookup as the resource field directly. Here are two field mapping approaches:
Using a Formula Field
First, create a formula field in your object. The formula will return the name of the resource as text, like "Exam Room 1" without the quotes. At this point you should see your events listed under the correct resource when you filter the calendar for "Exam Room 1". But you won't be able to drag an event to a new resource in DayBack--not yet--because DayBack would be trying to edit your formula field.
So you'll create a  Before Event Save action to telling DayBack to edit the actual Resource ID, instead of your formula field. You'll find an example of an event action like this here: it’s the  Looking Up A Resource Id By Name example on this page. https://docs.dayback.com/article/5-custom-actions
And if actions like this seem like too much to write on your own. we're happy to help. Just get in touch.  
Using Triggers 
You can use a trigger to get the same effect. You'd set up a new text field for the resource name and then map to that in DayBack. Next, create a trigger to look up the Id for the related record and assign that to the look-up key in your record. You'd then add a workflow rule to the key, so if it's changed outside of DayBack, the new text field also gets set up accordingly.
Here's a blog post we did that has some examples of using a trigger. We set the trigger to (beforeinsert, beforeupdate) and branched accordingly:  https://dayback.com/integrating-dayback-taskfeed-salesforce/

Still need help? Message Us Message Us