private static void FillMailCC(PXGraph graph, CRSMEmail message, Guid?refNoteId)
        {
            if (refNoteId == null)
            {
                return;
            }

            message.MailCc = PXDBEmailAttribute.AppendAddresses(message.MailCc, CRRelationsList <CRRelation.refNoteID> .GetEmailsForCC(graph, refNoteId.Value));
        }
 private static void FillMailCC(PXGraph graph, CRSMEmail message, Guid?refNoteId)
 {
     if (refNoteId != null && refNoteId.HasValue && refNoteId != null)
     {
         foreach (Mailbox email in CRRelationsList <CRRelation.refNoteID> .GetEmailsForCC(graph, refNoteId.Value))
         {
             if (email != null)
             {
                 message.MailCc += email.ToString() + "; ";
             }
         }
     }
 }
Esempio n. 3
0
 private static void FillMailCC(PXGraph graph, EPActivity message, long?refNoteId)
 {
     if (refNoteId != null && refNoteId >= 0)
     {
         foreach (Mailbox email in CRRelationsList <CRRelation.refNoteID> .GetEmailsForCC(graph, (long)refNoteId))
         {
             if (email != null)
             {
                 message.MailCc += email.ToString() + "; ";
             }
         }
     }
 }
Esempio n. 4
0
        protected virtual void FillRelations <TNoteField>(CRRelationsList <TNoteField> relations, TTarget target) where TNoteField : IBqlField
        {
            var entity   = Documents.Current;
            var relation = (CRRelation)relations.Cache.CreateInstance();

            relation.RefNoteID    = target.NoteID;
            relation.Role         = CRRoleTypeList.Source;
            relation.TargetType   = TargetType;
            relation.TargetNoteID = entity.NoteID;
            relation.ContactID    = entity.RefContactID;

            // otherwise value would be rewriten from cache
            PXDBDefaultAttribute.SetDefaultForInsert <CRRelation.refNoteID>(relations.Cache, relation, false);

            relations.Insert(relation);
        }