Aller directement à la fin des métadonnées
Aller au début des métadonnées


Documentation Search


CiviCRM 4.2 Documentation

Developer Resources


CiviCRM books!

Make sure to check out our Online User/Administrator and Developer Guides! You can also support this project by ordering a hard copy.

Or support us by buying an eBook or hard copy of Using CiviCRM from Packt Publishing.

Version 3.0+ includes a scheduled job (command line script) that allows you to update the cached values for Email Greeting, Postal Greeting and / or Postal Addressee for all contacts. These fields will generally be set to the system default values when records are created or imported. However if you decide to change the default format, or find the the values are not populated for some contacts - you can use this job to populate missing values or force a change to the value for all contacts.

It is strongly recommended that test this script against a TEST COPY of your database first, and that you take a backup of your CiviCRM database prior to running this script on your production database.

Contacts whose greetings are NULL will not be updated unless the force=1 argument is passed

Script: bin/cron.php OR bin/cli.php
Syntax: Refer to Managing Scheduled Jobs
Parameters:

ct

Contact Type

required

"Individual" or "Organization" or "Household")

gt

Greeting or Address Type

required

"email_greeting" or "postal_greeting" or "addressee"

id

Option value for greeting or addressee format

optional

uses default format if this parameter not supplied)

EXAMPLE: Using curl to run this script to update Postal Greeting format for all Individual contacts to use the default format specified at Administer CiviCRM >> Communications >> Postal Greetings

Note: Syntax only permits one set of parameters at a time. To update all contact types and/or all greetings/addressee fields you must run the script for each contact type and for each greeting/addressee type.  Thus each entry below exhibits an example of FORCEFUL updating all the greeting/addressee types for Individuals, you would substitute Household or Organization to update those as well.  You can simply copy and paste these into the "Command Parameters" box within this Scheduled Job (follow Edit link to locate the box that you place these parameters into).

EACH PARAMETER SET MUST BE RUN ON ITS OWN AND CANNOT BE ENTERED INTO BOX WITHOUT LINE BREAKS

ct=Individual
gt=email_greeting
force=1

ct=Individual
gt=postal_greeting
force=1

ct=Individual
gt=addressee
force=1

Refer to Managing Scheduled Jobs and Running Command-line Scripts via URL for general information about running command-line scripts in CiviCRM.

Étiquette
  • Aucun