Um amigo do trabalho e excelente profissional, Marcos Lima, me compartilhou um script para colorir as linhas do grid do CRM.
A ideia por incrível que pareça, é bem simples…
Um botão é adicionado no ribbon e possui uma chamada JScript que percorre as linhas do grid, pesquisando uma coluna e verificando o valor e comparando com algo que desejarmos.
No exemplo que estamos compartilhando, estou pesquisando a coluna “Prioridade” da entidade “Ocorrência” verificando os valores informados: Alta, Normal e Baixa. Cada valor da prioridade representará a cor da linha no grid.
Com este código podemos fazer qualquer adaptação, imaginem que podemos fazer consultas para serviços externos, cálculos, validações e etc.
O código foi testado em ambiente contendo o rollup 13, assim não asseguro o funcionamento em versões anteriores. Para baixar clique no link abaixo(não esqueça de alterar a extensão para “ZIP”):
I have been working with IT since 2006, almost of this time, I was working with Microsoft Dynamics CRM/365 as a source of solutions. I graduated in Bachelor of Information Systems at FIAP (Faculdade de Informatica e Administracao Paulista) in 2012.I really love what I do! Technology has been my interest since always. Even in a world too different of the current one, when we haven't had the internet, tablets, smartphones and social networks!Although I have worked in some different roles, I can't give up "the developer's life". Even knowing that I'm still so far of the greatest developers. Development is the thing that I love to do!I started my contributions with the Microsoft Dynamics community in 2010. At the beginning, I used to help at MSDN and TechNet forums. But now, I'm fully dedicated to this blog!I have the enormous honour of being the only Brazilian who got the award for Microsoft MVP (Most Valuable Professional) for Microsoft Business Applications (Dynamics 365). I have been receiving the award since 2012.In my free time. I like to cook, do some hiking, watch movies/series and when it's possible, travel!
Ver todos os posts por Tiago Michelini Cardoso