Skip to main content

13.5 SDK Action: Set Receiving Newsletter

This SDK function allows you to enable or disable newsletter receipt for the email address associated with a Lead, Contact, or Company by controlling the "Receive Newsletter" checkbox field.

The first parameter must be the `crmid` of the record for which you wish to update the "Receive Newsletter" field value.

The second parameter must be the fixed value "lock" if you want to set the "Receive Newsletter" field to "no"; conversely, to set it to "yes," pass the fixed value "unlock."

USAGE EXAMPLE

To better understand how it works, the following is an example of using the "Set receiving newsletter" SDK function to disable newsletter receipt for a Lead.

As the first parameter, we pass the `crmid` of the lead for which we want to update the "Receive Newsletter" field value—in our case, `$1-crmid` (Figure 1).

As the second parameter, we pass the fixed value "lock" (Figure 1).

image.png

Figure 1