Beispiel #1
0
        private IEnumerable GetEntityItems(String parent)
        {
            string screenID = IsStockItemFlag ? "IN202500" : "IN202000";

            PXSiteMapNode siteMap = PXSiteMap.Provider.FindSiteMapNodeByScreenID(screenID);

            if (siteMap != null)
            {
                foreach (var entry in EMailSourceHelper.TemplateEntity(this, parent, null, siteMap.GraphType, true))
                {
                    yield return(entry);
                }
            }
        }
        protected virtual IEnumerable entityItems([PXString] string parent)
        {
            if (MassMails.Current == null)
            {
                return(new CacheEntityItem[0]);
            }

            var graphType = new EntityHelper(this).GetPrimaryGraphType(typeof(Contact), null, true);

            return(graphType != null
                                        ? EMailSourceHelper.TemplateEntity(this, parent,
                                                                           PXSubstManager.Substitute(typeof(Contact), graphType).FullName,
                                                                           graphType.FullName)
                                        : EMailSourceHelper.TemplateEntity(this, parent, typeof(Contact).FullName, null));
        }