0

I'm reviewing another's code that does some things when data is shoved from NAV to CRM. I see what he's up to but I'm unclear on the pipeline staging. He uses 10, 20, 40 as stages of something and I don't get if he does something unnecessary or if it's needed.

I haven't ever used those pipeline stages in my plugins but it might have to do with the NAV integrations (Scribe plugin, or something like that).

Is that something anybody else's seen before? What is it good for?

Apparently there's a Stage property in the context of plugin execution interface.

Charles
  • 50,943
  • 13
  • 104
  • 142
Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438

1 Answers1

1

Probably the same plugin is registered in multiple steps with different pipeline (pre-stage, post-stage).

So it uses the Stage property to differentiate the code that needs to be executed.

Guido Preite
  • 14,905
  • 4
  • 36
  • 65
  • Oh, now I see what the dude is doing. I (almost) never register a plugin in different states, for different entities on multiple messages etc. because I want my plugins be... well plug-in-and-out-able. The way the code is designed now, it's less of a plugin and more of a cover. Readability suffers and it feels like all-in. Could there be advantage to his approach that I'm missing? I've only worked with CRM-NAV set up once and not very deeply... – Konrad Viltersten Jul 27 '13 at 15:22
  • It's only a programming style, for example I don't like too much the templates from the developer toolkit because sometimes I just need to write two lines inside the Execute method. – Guido Preite Jul 27 '13 at 16:06
  • Cool. That's what I thought. In this particular case, I believe that the style chosen by my predecessor is less than optimal. I'll need to explain that to the project manager without actually trashing the poor dude who's been there before me. I'm sure he did his best. Or rather - I'm **afraid** that he did his best. :) – Konrad Viltersten Jul 27 '13 at 16:15