Loading TOC...

alert.ruleSetUserId

alert.ruleSetUserId(
   $rule as Object,
   $user-id as String
) as Object

Summary

This function returns the rule with the user ID updated. If the caller does not have the alert-config privilege, an exception will be thrown if the caller attempts to save a rule for a user other than himself.

Parameters
$rule The representation of a rule.
$user-idThe user ID value to set for the given rule.

Example

  var alert = require("/MarkLogic/alert.xqy");

  alert.ruleSetUserId(
       alert.getAllRules("http://acme.com/alert/message-board", cts.wordQuery("dna"))[0],
       "7071164303237443533")

  => Returns the JSON representation of the rule with the
     new user ID updated to 7071164303237443533
  

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy