NotifyNow : isCallable(String participant)

  • Rversion finale: Washingtondc
  • Mis à jour 1 févr. 2024
  • 1 minute de lecture
  • Détermine si un utilisateur peut être appelé ou non.

    Un utilisateur doit avoir un numéro de téléphone valide pour être appelable. Un utilisateur qui est déjà dans une session active n’est pas appelable.

    Tableau 1. Paramètres
    Nom Type Description
    participant Chaîne ou GlideRecord Un enregistrement sys_user ou notifynow_participant, ou un numéro de téléphone conforme E.164.
    Tableau 2. Renvoie
    Type Description
    booléen Indique si ce participant peut être appelé ou non.
    var nn = new SNC.NotifyNow();
    gs.log('by number: ' + nn.isCallable('+31612345678'));
     
    var user = GlideRecord('sys_user');
    user.query('sys_id', '13d39544eb5201003cf587b9d106fea9');
    if (user.hasNext() && user.next())
      gs.log('by user: ' + nn.isCallable(user));
     
    var participant = GlideRecord('notifynow_participant');
    participant.query('sys_id', '33b11430eb1201003cf587b9d106feb9');
    if (participant.hasNext() && participant.next())
      gs.log('by participant: ' + nn.isCallable(participant));