1

I am using Cases and I have several custom objects that I have built and they are linked using Master-Detail relationship and they are on the Case page layout using Related Lists. If I leave as is they have the "New" button for each of the related lists that when selected will import the Case ID into those custom objects, but I do not want each custom object to have the "New" button on the outside. I have created validation rules that require users to complete one section and then when they save that section it has the custom button to go to the next section but it does not auto-populate the Case ID.

What do I need to do in the Custom Button to have it passes the Case ID?

2
  • 1
    put a picture of screen and custom button code for better understanding Commented Jul 14, 2016 at 19:27
  • dropbox.com/sh/iubne6v0eaamy1h/AACoNqtLao2WxEXZ2ksPtd3ea?dl=0 The first shows the Cases Home Page from Red arrows down are Custom Objects and Black arrows is New Button that automatically appear. If I click on the Black arrow it will open that custom object and will add the Case ID, as shown in pic #2 (I removed the Black arrow buttons from Due Diligence down.) The 2nd pic shows the Case ID, I want to use the custom button (red arrow) when I click on that custom button the same type of page opens but it will not add the Case ID like the New buttons on the Case Home page.
    – Chris
    Commented Jul 15, 2016 at 11:59

1 Answer 1

0

Hmm, clarification :

  1. You want to send Case ID to custom object via custom button? Yes? No?
  2. You want to REMOVE "New" button from related lists under Case detail page? Yes? No?
  3. You want users to complete/finish previous "section" before going to next section? Yes? No?

Please provide as much info as possible!!

Possible solutions :

  1. Use a Visualforce page to get the "on click" functionality.
  2. Make a special field on the custom objects. Perhaps a checkbox.
  3. Use different page layouts + record types to show/hide new button.
  4. Use Workflow rules to change record types depending on what conditions you want.
  5. Visualforce page is also very useful for step-by-step or section based work. You CAN use a VF page to do your section by section completion.

Answer :

You may refer to this answer for more information :

Link 1. How to pass parameters to VF page and how to update fields via controller

For Q#1,

You need to make a detail page button on the object and either pass the ID via (remember to replace Case_or_YOUROBJECTNAMEHERE with your object and YOUR_VF_PAGE_NAME by your VF page name) :

  1. Javascript
  2. URL

For Q#2,

You need to EDIT the Page Layout. Go to "Buttons" sub-section and remove (drag n drop the required button to the upper holding area or press the small "(x)" next to it) the desired button.

For Q#3,

Refer to THIS EXCELLENT GUIDE. Basically, you're moving through 4 VF pages, each with their own functionality, using PageReferences to move to each of them.

Hope it helps!! And I hope its not too late :)

2
  • Question #1 is my main goal, I already know how to address Question #2 and Question #3 is addressed by removing the "New" button in question 2, that is why I created the Custom Buttons in the Custom Objects. I will try the Visualforce idea...Now I just have to learn about visualforce pages!
    – Chris
    Commented Jul 15, 2016 at 12:32
  • Ok Chris, sorry for the late reply, it was a weekend. I am working on the answer, will update my answer when I am done.
    – fraglord
    Commented Jul 18, 2016 at 8:29

You must log in to answer this question.

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