• mward
  • NEWBIE
  • 5 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies

So I have a custom object called Timesheet.  For Timesheet, I've included the built-in Activities/Tasks, and added a custom field to the Activities Custom Fields called "Hours Spent."  So, let's say this is a Timesheet for Project X.  I want to have a list of "Tasks" using the built-in Activities/Tasks that are related to my Timesheet.  For instance, "Perform Duty Y for Project X" is one task, and the "Hours Spent" field is set to 3.0, i.e. it took 3 hours to complete that task.

 

What I want is to have a custom field in Timesheet (not the Activities/Tasks) called "Total Hours Spent" that accumulates all of the "Hours Spent" from the individual Tasks below.  How can I retrieve those values, sum them up, and have them appear in a Timesheet custom field?

 

I attempted to use a Custom Field for Timesheet, "Formula" type.  However, in the "Enter Formula" area, there appears to be no way to select the fields of Tasks.  This is particularly hard to wrap my brain around, because the NUMBER of Tasks is never set.  Even if you could select fields of Tasks in the formula, one Timesheet could have 3 Tasks (meaning that three "Hours Spent" values would have to be added together) while another Timesheet could have 19 Tasks (meaning that nineteen "Hours Spent" values would have to be added together).  My gut is telling me I'm going to have to delve into Apex and iterate through however many Tasks there are, since it's variable.  I'm ready to get my hands dirty with Apex, but how do you reference Tasks, much less Custom Fields of Tasks, in code?

 

Thanks.

 

---

 

P.S. I'm a super newbie without any background in anything relevant to salesforce.com.  This is a personal project that I'm pursuing to become more fluent in the system as a whole.  As this is for fun/practice, I'm not at all concerned with any kind of flawed business logic, as I'm sure there are conventions/rules I'm unaware of.  At the moment, it's just an issue of learning the rules of custom fields.

  • May 02, 2010
  • Like
  • 0

I'm messing around with some tutorials using a developer account, and the screenshots and descriptions refer to a "plural" field.  Strangely, I do not seem to have this field.  It really doesn't seem to be a big deal, as far as the tutorials go, but I'm just curious as to why I don't have this field/where I can enable it.  I know this is a stupid and trivial question...sorry.

 

Thanks!

 

My screen looks exactly like this, except the "Plural Label" is completely non-existent, skipping straight from "Label" to "Object Name," even though the "The singular and plural labels are used in tabs, page layouts, and reports" description is there, obviously refering to a "Plural Label," I just simply don't have one.

 

Custom Object Creation

 

 

  • April 29, 2010
  • Like
  • 0

So I have a custom object called Timesheet.  For Timesheet, I've included the built-in Activities/Tasks, and added a custom field to the Activities Custom Fields called "Hours Spent."  So, let's say this is a Timesheet for Project X.  I want to have a list of "Tasks" using the built-in Activities/Tasks that are related to my Timesheet.  For instance, "Perform Duty Y for Project X" is one task, and the "Hours Spent" field is set to 3.0, i.e. it took 3 hours to complete that task.

 

What I want is to have a custom field in Timesheet (not the Activities/Tasks) called "Total Hours Spent" that accumulates all of the "Hours Spent" from the individual Tasks below.  How can I retrieve those values, sum them up, and have them appear in a Timesheet custom field?

 

I attempted to use a Custom Field for Timesheet, "Formula" type.  However, in the "Enter Formula" area, there appears to be no way to select the fields of Tasks.  This is particularly hard to wrap my brain around, because the NUMBER of Tasks is never set.  Even if you could select fields of Tasks in the formula, one Timesheet could have 3 Tasks (meaning that three "Hours Spent" values would have to be added together) while another Timesheet could have 19 Tasks (meaning that nineteen "Hours Spent" values would have to be added together).  My gut is telling me I'm going to have to delve into Apex and iterate through however many Tasks there are, since it's variable.  I'm ready to get my hands dirty with Apex, but how do you reference Tasks, much less Custom Fields of Tasks, in code?

 

Thanks.

 

---

 

P.S. I'm a super newbie without any background in anything relevant to salesforce.com.  This is a personal project that I'm pursuing to become more fluent in the system as a whole.  As this is for fun/practice, I'm not at all concerned with any kind of flawed business logic, as I'm sure there are conventions/rules I'm unaware of.  At the moment, it's just an issue of learning the rules of custom fields.

  • May 02, 2010
  • Like
  • 0

I'm messing around with some tutorials using a developer account, and the screenshots and descriptions refer to a "plural" field.  Strangely, I do not seem to have this field.  It really doesn't seem to be a big deal, as far as the tutorials go, but I'm just curious as to why I don't have this field/where I can enable it.  I know this is a stupid and trivial question...sorry.

 

Thanks!

 

My screen looks exactly like this, except the "Plural Label" is completely non-existent, skipping straight from "Label" to "Object Name," even though the "The singular and plural labels are used in tabs, page layouts, and reports" description is there, obviously refering to a "Plural Label," I just simply don't have one.

 

Custom Object Creation

 

 

  • April 29, 2010
  • Like
  • 0

ok, here goes another attempt at getting some help with this.

 

Steps:

1) Custom object is created.

2) Custom tab for custom object is created.

    a) This tab shows the default view, just showing a list of object/record names.

3) I click Edit next to "View: All [Go!]" to customize the view.

 

HOWEVER, in order to get to my customized view the user must click [Go!] after opening the tab. How do I get my custom view to display by default?