·
1 min read

Customize the Default Member Type of a New Marketing List

When creating a new Marketing List from the detail form you will notice that the Member Type field has no default value, you must select what the member type should be. The Member Types allowed on a Marketing Lists are restricted to Account, Contact, or Lead. These values are not customizable, but there is a method I will cover in this blog that will allow you to select which of these three types (Account, Contact, or Lead) you would like to have populated as a default on the form when creating a new Marketing List. Setting a default value may save an extra step if you primarily only create Marketing Lists of one Member Type. The default value will still be selectable and changeable until you lock it in by “Saving” the new Marketing List.

clip_image002
Fig 1: New Marketing List with no default value populated for Member Type

Steps: (System Privileges to Customize the Marketing List Entity will be Required)

1. Navigate in MSCRM to Settings -> Customization, Clicking “Customize Entities”

2. Locate “Marketing List” in the Customize Entities Grid and Open

3. Navigate to the Marketing List “Forms and Views” and open “Form”

4. When the Form Window opens, Click “Form Properties” located in the lower right of the window.

5. When the Properties window appears, you will see on the Events Tab an “On Load” and “On Save” option. Choose “On Load’ and then click “Edit”. This will launch a new “On Load” event details dialog.

6. Check enable the box “Event is enabled”.

7. Next, Type the following code into the function onLoad text field

if (crmForm.all.createdfromcode.DataValue == null)
{
crmForm.all.createdfromcode.DataValue = 2;
}

Where Account is represented by the value of 1, Contact 2, and Lead 4.

clip_image004

8. Click ‘Ok’ on the Event details dialog, Click ‘Ok’ on the Form Properties window, and then Save and Close the Customize Form.

9. On the Customize Marketing List Entity Form, Actions Menu, Choose to “Publish”

clip_image006

Result: Now when you choose to create a new Marketing List and Launch the Form, the Member Type field will contain a default value.

Cheers,

Jim Schumacher