I am currently the Salesforce administrator of a company Enterprise account. Our accounts are made up of universities. I was asked to implement a form for trips.

The trips basic information is: Trip name, University, Region, Country, Project manager and Project manager met. I created the object trip and added the custom fields using lookup relationships with contacts and accounts. This was very easy to do so.

The first problem is as we move through the form. The next section is about the university info which has these fields: Number of students, Number of faculty, Language. They are asking me that these fields override the information that was previously stored in the account. Like if you pick X university and it had 200 students originally, then if I write 205 in the field , it will overwrite the previously set number.

My second problem is, in the next section of the form they have an objectives section. For example, there is a text field with the label :

"Objective 1 _____" +

if you want to add a new objective there is a "+" sign that will create a new field

"Objective 1 _____" +

"Objective 2 _____"

How can I achieve this? Is there a way with basic creating system? Do I need to create a Visualforce page? Thank you for your help.

3 Answers 3


With your first "problem" which I'm not so certain is a problem: When your form is submitted, it will simply update the field with the new number of students for the account.

For the objectives. One option would be to create a large text field to contain all of the objectives and use a formula to combine them and put them into that text field. That way, regardless of how many objectives you have, they'll all go into the same Objectives__c field. You could have a formula that looks like Objectives__c = 'Objective_1_______' + 'Objective_2_________' + ' Objective_3______________'; The difference being that Objective_1 changes to the text field input number that you have associated with your page since it won't be an actual field you'll be writing to.

I'm don't think I'm explaining this nearly as clearly as I'd like. I believe your best solution may be to use what's called "Flow". I'd recommend you download the Cloud Flow Designer Workbook from here. And yes, you may need to create a visualforce page or two, but I think you'll find that easier than you expect. The workbook will walk you through how to do that.

Edited to add: There are a number of ways of approaching this. You might also want to look at Force.com Platform Fundamentals where you build a basic application that's more complex than what you're creating. However, it may give you some ideas on some of your options of how to approach it. The VisualForce Workbook would be another resource to look at. If you limit the number of Objectives you allow, you could still create a summary Objective large text field with a formula look-up to each individual objective that displays all of them as a summary in one location without having to code anything. While its an extra field, particularly since it's a formula look-up, I wouldn't be concerned about having additional fields for this purpose.

I'd think you'd want to use a data entry form and then have a summary results page. The individual objective fields wouldn't be displayed on the summary page and the summary objective field wouldn't be displayed on the data entry form. I think you'll have a much better idea of what I'm describing after reviewing the Platform Fundamentals Workbook where they build a Recruiting Application.

  • With the use case you described Flow can handle it all without any VisualForce pages unless you want to change look or get more complicated.
    – ddeve
    May 10, 2013 at 19:07
  • I know I wasn't articulating myself very well on this one today. Flow should essentially create the VF pages for him with point and click. No coding involved. With coding, a single visualforce form page would do the job, but that would seem to require additional JS or jQuery to make it open new Objective dialogues and assemble the final text string upon saving.
    – crmprogdev
    May 10, 2013 at 20:37
  • I read too fast and didn't see you wanted to add a field. You need more than Flow for that. I thought you were just adding to field data with your + sign.
    – ddeve
    May 11, 2013 at 2:55
  • @user2451, I was suggesting to put all the objectives into one field. Wouldn't need to add a field to the object, just use instance variables to hold them during assembly of the string in VF pageview. That way, in theory, you could have as many objectives as you wanted. This project could obviously be done in a variety of ways depending on experience and familiarity with tools.
    – crmprogdev
    May 11, 2013 at 3:17

I think Visualforce is what's called for here. In the first scenario, you'll need to update the associated account object when trip details change. This is easy to accomplish in an action method of a VF page, but not so easy (or possible) with just configurations.

Your second issue seems to call for a master-detail relationship where the detail represents an objective. Alternatively, you could have N number of available objectives hardcoded in the Trip object and when they click the + sign, 1 of the N available objective fields would be rendered (Objective_1__c, Objective_2__c, etc.) But this also seems to call for Visualforce, unless there's a "clicks" way to accomplish this that I'm unaware of.


For the first case, you can look at writing a trigger to update Account fields based on insert/update of Trip record.

For the second, I would probably go with either a VF page or cloud flow designer as @crmprogdev suggested.

Although this is not part of your questions- Can I recommend you to re-evaluate the relationship between Account and Trip, from being a look-up to Master-Detail? (As to me, Can there be a form without a university?) If so, a simple cross-object workflow can handle your first question and also lets you create roll-up summary fields.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .