You are here

function sf_notifications_enable in Salesforce Suite 7.2

Same name and namespace in other branches
  1. 6.2 sf_notifications/sf_notifications.install \sf_notifications_enable()

@todo Please document this function.

See also

http://drupal.org/node/1354

File

sf_notifications/sf_notifications.install, line 12

Code

function sf_notifications_enable() {
  global $base_url;
  $sfuser = variable_get('salesforce_api_username', 'user@example.com');
  $formula = '<code>NOT($User.Username = \'' . $sfuser . '\')</code>';

  // @todo: Find a way to link to outbound messages and workflow rules without hard-coded URLs
  //  since these vary per Salesforce org.
  $args = array(
    '!base_url' => $base_url,
    '!formula' => $formula,
  );
  drupal_set_message(t('You have successfully enabled Salesforce Notifications. To make use
    of this module, you will probably want to head over to salesforce.com and
    set up some outbound messages and
    associate them with workflow rules. Point the outbound message(s) to
    !base_url and set up the workflow rules to fire when the user is NOT your
    SFDC API user. Use the following formula if you are unsure: !formula.', $args), 'warning');
}