Skip to main content

Trying to achieve three RD goals at once when creating a new RD record:

1. Restrict creation of RDs to be ONLY from either a Contact record or from an Organization record, using the New RD button in the RD related list and NOT from the Create New sidebar or the New button on the RD tab. (I still want the RD tab to be visible so existing RDs can be seen).

2. Pre-fill either the RD's Contact field or the Organization field depending on the starting page in 1. above.

3. Pre-fill the RD's Name field using the Contact or Organization name.

To achieve 1., I have a simple VF page that I already use to override the New button for Opp and prevent creation from the sidebar or Opp tab. Then I use the "nooverride=1" parameter in my custom buttons to bypass this VF page.

Question 1: When I try to override the std New button for RD, my VF page is not available in the list of VF pages. Nor are any VF pages except two whose names start with RD and RecurringDonations. Am I able to make my VF page visible to the RD package?

The std RD New button pre-fills fields as per 2. above, but does not pre-fill the RD name. There are also two custom buttons in the RD package called "New Recurring Account Donation" and "New Recurring Contact Donation" that pre-fills the Name field via URLFOR, but does not pre-fill the fields in 2. above.

Question 2: Can I use the strategy of cloning these buttons and adding another parameter to URLFOR to fill in the Contact or Organization fields, or will this break something else about RD creation (i.e., must I stick with the std New button for creating RDs)? I would also have to add the [no override] parameter to the URLFOR to work with 1. above.

PS: I don't see any documentation of these custom buttons anywhere. Are they intended to be used or deprecated?

Thx!

1 answer
  1. Sep 25, 2014, 9:30 PM

    Answered my own question. I had to create another VF page whose std controller was npe03__Recurring_Donation__c. I chose to use the following syntax rather than URLFOR to pre-fill fields - don't know if this has risks that URLFOR avoids, but it worked:

    /a08/e?

    ent=01Ii0000001HsJz&

    retURL=%2F{!

    Account.Id

    }&

    CF00Ni0000007hpSi={!

    Account.Name

    }&

    CF00Ni0000007hpSi_lkid={!

    Account.Id

    }&

    Name={!

    Account.Name

    }-%20Recurring Membership%20{!Today}&

    nooverride=1

0/9000