Example #1
0
        private void AtualizaInformacoesPortfolio(SolicitacaoBeneficioService ServiceSolicitacaoBeneficio, SolicitacaoBeneficio solicitacaoBeneficio, ref Entity e)
        {
            var portfolioRepresentante = ServiceSolicitacaoBeneficio.ObterPortfolioRepresentante(solicitacaoBeneficio);

            if (portfolioRepresentante != null)
            {
                e.Attributes["itbc_assistadmvendasid"] = new EntityReference()
                {
                    Id          = portfolioRepresentante.AssistentedeAdministracaodeVendas.Id,
                    LogicalName = SDKore.Crm.Util.Utility.GetEntityName <Usuario>(),
                    Name        = portfolioRepresentante.AssistentedeAdministracaodeVendas.Name
                };
                e.Attributes["itbc_supervisorid"] = new EntityReference()
                {
                    Id          = portfolioRepresentante.SupervisordeVendas.Id,
                    LogicalName = SDKore.Crm.Util.Utility.GetEntityName <Usuario>(),
                    Name        = portfolioRepresentante.SupervisordeVendas.Name
                };
                e.Attributes["itbc_karepresentanteresponsvel"] = new EntityReference()
                {
                    Id          = portfolioRepresentante.KeyAccountRepresentante.Id,
                    LogicalName = SDKore.Crm.Util.Utility.GetEntityName <Contato>(),
                    Name        = portfolioRepresentante.KeyAccountRepresentante.Name
                };
            }
        }