Skip to main content

I'm setting up a custom 'New Course Fees' Donation/Opp'y Record Type Action button on Contact and Accounts in the NPSP, and I'd like the name to prepopulate just like it does when I click the 'New Donation' action button. I set up the Opportunity Naming convention for the record type under NPSP settings, but then I was surprised to see for New Donation that a formula was used to create the predefined value for the Name for the 'New Donation' action. Is it best practice to create the naming convention in both places (NPSP Settings and manually using a formula on the Action button predefined values)? Here's the documentation I used: https://powerofus.force.com/articles/Resource/Add-or-Edit-a-New-Opportunity-Button-on-Contacts?r=1&popup=true Thanks! 

5 respuestas
  1. 7 jun 2017, 4:22

    I don't know if this will help, but here's what I did (after much bumbling around and not a little frustrated cussing):

    I looked at the code for the New Contact Donation button, which is this:

    /setup/ui/recordtypeselect.jsp?

    ent=Opportunity&

    retURL=%2F{!

    Contact.Id

    }&

    save_new_url=%2F006%2Fe%3Flookupcmpgn%3D1%26retURL%3D%252F{!

    Contact.Id}%26accid%3D{!Account.Id}%26conid%3D{!Contact.Id}&opp3={!Contact.Name

    }-%20Donation%20{!Today}

    I used that to create my own Add Contact Donation button, and with some guidance from various posts I found online, I created this URL for the button:

    /006/e?retURL=%2F{!

    Contact.Id}&RecordType=012360000012D4B&ent=Opportunity&opp3=Donation%20-%20{!Today}%20-%20{!Contact.LastName}&opp11=Posted&opp9={!Today}&00N3600000Gh0Ex={!Today}&opp4={!Account.Name}&CF00N3600000Gh0FO={!Contact.Name

    }

    This creates a "placeholder" name for the donation that would look like this for a donation created today from my Contact record:

    Donation - 6/6/2017 - Ezzell

    Once I select the campaign and finish entering the donation data, when I save the record, it gets renamed appropriately, like

    Newsletter - 06/06/17 - Ezzell, Ann

    (If I selected the newsletter campaign.)

    If for some reason the name isn't correct (like I imported it incorrectly, or someone changed it), I can use the Refresh Name button on the opportunity details page to set the right name.

    If I just make a new donation from the Donations tab, nothing is filled in to start with. I've been unable to find a way to set a default value for that field.

    When entering the data, I have to provide something like "x" in the required Donation Name field to be able to save the record. But when I do save it, the donation is renamed according to what I've set up in NPSP Settings.

    {!Campaign.Short_Name__c} - {!CloseDate} - {!Contact.LastName}, {!Contact.FirstName}

    Does this make sense?

0/9000