Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

CRM Audio

CRM Audio artwork

jQuery or Not, Client-Side API Will Always Start with a $

Apr 4, 202622 minAudio

Power Pages is having a surprisingly good run. In this episode we dig into server-side logic debugging, the new client-side API, and why both feel about 15 years late yet still genuinely useful. We also look at Omar Zaarour's business-rules tool, Danish Naglekar's cross-platform Power Platform Toolbox, and George's Entra ID auto-clicker for making one of the most annoying prompts quietly disappear. References Power Pages Server Logic Debugging Guide | Microsoft Learn Code-only connectors Power Pages Client APIs Overview (preview) | Microsoft Learn Omar Zaarour's T365 Power Pages Business Rules Danish Naglikar's Power Platform ToolBox | Modern desktop companion - PPTB Entra ID Auto Confirm browser extension Get in touch voice@crm.audio Nick Hayduk @Engineered_Code George Doubinski @georgedude

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Transcript

From the show. Tap a time to play from there.

George: Good morning. Oh, good afternoon. Nicholas: Good evening and good morning to you, George. How are things down under? George: Surviving. It's hot, but other than that, it's fine. settled in after all the shenanigans around New Year. How about yourself? Nicholas: No one's, complain about it being, too hot here. I just, I was lucky enough to escape to some hot weather last week, so I paid money to. To get to where it was hot. So, thankfully I missed the minus 40 degrees temperatures that we had, here in my hometown for while I was away.

when I came back it was much more closer to freezing. George: Remarkable. When you say minus 40, you don't have to say whether it's Fahrenheit or Celsius. Nicholas: That's, why I use that because it's, everyone knows that that's fricking cold either way, and that's, for those of you who don't know, minus 40 Celsius and minus 40 CELs or, and Fahrenheit is, is the exact same thing. So it's, everyone knows that that's cold. George: Yeah, pretty much. So, what's on your mind besides, power pages? Nicholas: I mean, besides Power Pages, not a whole lot. heads down on a couple of big projects right now and, happy that you reached out

to say, Hey, we should talk about some of this, cool new stuff that's coming for us pro developers in Power Pages, which, you know, there was a time when that, was pretty, few and far between. Yeah, excited to talk about some of these new, new features. George: You've been killing it on LinkedIn with your memes. Nicholas: You know what? That's, it's, It's funny that you mentioned that because, you're right, and I'm not gonna take all the credit for it. In fact, I'll, I used to be the one that, you know, was primarily responsible for it, and then I kind of ran out of ideas. And so I've had some other people from my team help me, and they've been doing a great job. But, this is the first time kind of, I'm telling this story to,

you know, outside the company. But we did actually have a meme the other week that, Was not appropriate that we determined later, used an image that we should not have used. So that was certainly a learning experience, completely accidental, but it basically was an image that referenced an event that we had no business, referencing. it certainly was a learning experience. Again, completely accidental and I'm glad that there were people on LinkedIn who called us out. So we, we took it down right away. But it was certainly a learning experience, for how, you know, using AI can, can, lead to things that you never intended.

George: Now I'm intrigued because I didn't see it, but then, you know, it makes me, me a little bit, curious about what works on LinkedIn and why people go on LinkedIn. So you, you people sweat, you know, thoughtful posts and I'm not talking about AI slop. I'm, I'm talking about proper, thoughtful, posts and take maybe 10 likes and then you roll up with the meme and boom, it's like 300.

Nicholas: Yes. I would say the, the humorous content does a lot better than the, kind of the, the other stuff. So, yeah, no, it certainly has been, we, we do get a lot of interactions with the, with the memes that we put out every week. George: So I guess, yeah, I wonder when LinkedIn is gonna reach the status of, comedy Central. And that's it. Just for fun, you know, meme meme.com. Nicholas: Yeah. George: About, power Pages. I'm actually surprised with a lot of resources being diverted to ai.

It's kind of interesting to see that Power pages in the last probably six months, they just delivering things. That were long overdue But it's really interesting that at the time when you'd expect like AI been, you know, enhanced so it can generate these or that sites instead of that, it's kind of shifted and now they delivering, good libraries, that people can use. Do you think that those libraries created with the Codex or Copilot or Claude?

Nicholas: Oh, that's a good question. I didn't, I've never really even thought of that. I. I would say that there's maybe some assistance there, but I've, you know, some of the stuff that, we're starting to see, we, we've known it's been in the works for probably longer than, you know, the, the AI stuff was kind of the big, the big push. So I, I think that a lot of it, is still more, human generated than AI generated. That's my guess. George: Well, let's dive straight in. So the first topic, something that we missed, not intentionally, but because it wasn't there at all, is, server site logic, debugging.

what do you make out of it? Nicholas: Yeah, just another, you know, another nice enhancement for the, the Pro code people who are starting to leverage the server logic, which, for those of you, if, if you kind of missed our last podcast or you're kind of new to this, you, the ability to write JavaScript, that runs on the server side, as opposed to client side and the browser. it actually runs on the Power Pages server. a great feature because, you know, we've, that, that was one of the things that, that, that was lost kind of when, when we moved from way back in the day from ADX studio into the, you know, the, the Microsoft owned world, is that we couldn't

just write our own kind of c sharp code. there's lots of things from a security perspective that, that really need to be done in server side code. When you have like secrets and API keys and things that you need to do, And so, with this Server Logic functionality, you can write this JavaScript that's running in a secure environment right on the server, and you don't have to worry about the, the end users having access to it or mucking around with it. So, what would, what's been recently introduced is that you can, within your VS code desktop environment, you now have the opportunity to essentially

kinda start a debugging session. it basically kind of mocks it up and, you, you can run. Kind of step through your, your server logic JavaScript. So, a nice enhancement for the people kind of running JavaScript, in the, on the server side logic, as opposed to kind of the, the painful way that you'd have to de debug with kind of trial and error before this. George: just to clarify, because you, you dropped the word mock and, just to clarify for anyone getting too excited about the feature, it runs, but it

runs locally and it doesn't talk to the server at all, as far as I understand. So all the object responses, all the calls that you make, they come from a mock. So, and there is a special file that you drop in, called Server Logic debug runtime dot js, and you drop it into VS code folder and that's where you mock the responses. if you expect something from Dataverse or from the HTTP call, then that's where it mocks it.

not sure about Dataverse, but, there is not a lot of, documentation around debugging and structure of this, file. Nicholas: Yeah, I mean, according to the documentation, the only thing that kind of actually works is the HTTP client. So if you're using that to call external things, the HTTP client will actually fire off requests. But, things like, you know, access to dataverse or websites or site settings are all mocked objects objects They're using it to interact with kind of a third party, API, that HTTP client's gonna be helpful to test that out

George: The whole idea is that gives you ability to step through your code and see where your logic fails you. What would be nice, you run it on a server and it captures the outputs of all your calls, and it creates a mock for you. So then you can enhance, so you do the calls, you capture the output, and then it pre-create js file for you for mocking. That would be nice, but I mean, as it stands, it's a huge improvement because one of the options is definitely talk, To a third party, API.

That's one of the great advantages of that because you can do it securely and you don't have to mess around with the keys and things like that. Sorry. You, you do have the keys, but you don't have to mess around with securing those keys and, Jumping through the hoops and doing plugins just to, to be able to secure the call to a third party, without exposing it on the client side. So that, that's really nice and that part that you can just simply debug. yes, the rest you have to mock, interestingly enough. Yeah, I do have, a public repository where, I created a

bunch of, code only, connectors. So it's power platform connector for power automate or logic apps. It does nothing else, but, but running the code. the code come from CSX file that you can upload and so on. And one of the things that I managed to resolve is, debugging and exactly the same approach. You have to mock the calls, you expect. And then you can step through your code. So, you make a call, You step through a code, you get the mock responses,

and then you, you effectively, you, you can channel it back. difference is you have to mock calls in rather than out. So, because connectors, you can't just call connector directly, so you have to mock a call to, to your connect. So, but the end result is the same. You can step through the code, clean out whatever needs to be cleaned out and, get on with your life. Well that's, that's a valuable addition. So Kudo to, to the team. They added it shortly after the server-side Logic it's

still in preview, right? So yeah, it's still in preview, but at the moment it dropped into preview literally a few weeks later. we have, server Logic debugging, which is great. but in addition to that, same story, 10 years overdue or more. But finally we have a client API. Tell us about it, because you, you've used it for a while, right? Haven't you? Nicholas: Yeah, I did, I did see this a while back when it was in private preview. And so this is a client side, API for Power pages.

this is something that, you know, is going to change the discussion around how to write JavaScript, for Power Pages. Historically, the answer was, Hey, you could actually like manipulate the dom. Something that was always a big no-no in the kind of. Model driven power apps, CRM world. now what we have is an actual supported, the, the object is kind of dollar sign pages. So there's an object where you can go in there to, you know, get and set values on forms. have options to, navigate on multi-step forms.

So kind of go, go the next step. Go to previous step. You can use that object to call the web API, as well as manage things like the user management. So sign in, sign out users. So there's all these options within this API. kind of historically for, again, much of the like, say form manipulation, we were just doing with, you know, whether it was jQuery, selectors or vanilla JavaScript code to, to modify those things. Honestly, like those approaches have been fine. I mean, there's code that was written 15 years ago that's still working.

So there, it didn't change a whole lot. Not in the same way that I know kind of model driven apps have changed over the years. it is nice to now kind of have an official way to do that. It's great to have this, this new API and should just make things a lot more consistent across projects. Makes it easier, I think, to develop community tools that are going to be applicable across projects. yeah, I think it's, it's a, it's a great change. It's, it's one of those things that. You know, it's not, it's not going to, it's not a kind of a new feature that's gonna change what we could do with Power Pages. It's just gonna make it kind of easier to maintain and,

and, and do that sort of thing. So, I dunno. What do you think, George? George: First is this still j query based? Nicholas: Oh, that's a good question. I, I don't think so. mean, I'm sure that jQuery is still a dependency built into the product, but, I don't believe that it's jQuery based. mean, none of the examples are, you know, when I used it, there were no specific dependencies on, jQuery. I think the answer is no, George: So they probably use modern browser API, Nicholas: I would hope. Yep. George: And, manipulate controls and so on, because there are no

specific methods that I can see in documentation, which are jQuery specific. There's no jQuery specific calls. there are calls which you have like get visible, get name, Get value, set value, they they more on par with the model driven forms. Nicholas: Yeah, I think it's very much inspired by the, similar to how the, you know, the dataverse, kind of web API is is the inspiration for the Power Pages web API I, I think they've taken that, that similar approach there.

George: they support both, approaches. One is truly asynchronous with async await syntax, for modern browsers. And then they have callback API if you don't want to use async await. you know, In jQuery we always have on document ready or similar construct to tell us when the page finished loading. They do have a callback microsoft Dynamics 3 6 5 portal OnPage client, API, ready. I wonder if that one is, jQuery based, but I doubt it.

It's probably based on document ready event or something like that. Other than that, yeah, it's terrific. And that one you can step through, right? So if you just put. Breakpoint or what debug that you forget to take out and deploy into production. you can just, break in and start debugging, right there in the browser. By now you probably have a set of. Methods, libraries of your own that you use or preferred approaches, do you see yourself moving to this one, or do you see kind of replacing internals

of your own libraries with these, Nicholas: think. Somewhat of a combination, but I think for the most part, you know, on, on the simple projects like this can probably do the trick and eliminate the need to have your own little libraries. I certainly don't see a huge effort being put into converting existing sites to, to use this. don't expect that this means that there's gonna be big fundamental changes to the, to the markup underneath that, that's gonna necessitate updating codes. So I don't think anything's gonna change with the existing things.

I think kind of going forward, it's certainly this would be the way to do it. And I think for most projects, I don't know that you'd need that kind of extra layer of the stuff. I think the most part, what our kind of internal libraries were doing was just making it consistent, using these things so that if Microsoft did change it, even though they haven't in 10 years, if they did, there'd be a single place to change it in. They're kind of, kind of handling that for us. So, certainly like, you know. As much as, you know, the set visible or setting values on form fields is great. I just like how it kind of simplifies, using the web API like.

I think that there's always that kind of chunk of code that's associated with the web API, so I think it's gonna really, make that a lot simpler to, to use as well. George: We still have to deal with the, validation nonsense, don't we? Nicholas: I think that's kind of built into their, into that library. George: No, when you want to deploy custom validators, Nicholas: Oh, yes, yes. Yeah. You still George: this legacy of ASP.NET. Nicholas: ASP.NET. Yeah. Web forms. Yeah. Yeah. Yeah. George: just to build something like, oh, I want this field. know, only take, alpha numeric but.

The number zero. And you have, instead of just plonking in something like regex, you, you end up with the validator, instantiating validator, injecting it to the right place, making sure the messages go to the right place, and summary goes to the right place. And it's like, oh, it's, we still have to deal with that. Right. Simplifying or unifying validators would be the next logical step because client side growing, like in capabilities.

So we have, web API now we have these library , it certainly. Matures and, evolves. So I'd say dealing with validators would be nice, and getting rid of jQuery would be even nicer. But that's a long shot. Nicholas: The other thing I just wanted to highlight, I'm not sure if you, if you've seen this or not, but a, a new community tool by Omar Zarour, which is basically replicating business rules in power pages. I'm not sure if you've seen that one, George George: I, haven't looked into it. does it generates, a JavaScript equivalent of the JavaScript

generated by business rules, Nicholas: So I had a chance to review this with, with Omar probably a month or two ago as he was working on the development of it. It's a great tool that you can, basically enable the, the business rules. I'm not sure why isn't a feature of Power Pages already. So if you have business rules that appear on your forms, it just automatically, respects all of that. I know he's working real hard to close any gaps that may be found. You can find the tool and it basically just install a managed solution, I believe he calls it the T 365 Power Pages Business Rules.

It's a great thing to look into. And I know that he mentioned he released this almost around the same time that they released this client API. So I know that he intends to update his tool to use that. He had just kind of built it using the more traditional dom manipulation stuff. But, I expect that he'll update the tool to, leverage the client side APIs. So if you're looking to support business rules on power pages worth looking into that tool. George: Since we're calling out community tools, I have to take my hat off to, Danish Naglekar power platform toolbox and this cross platform.

So finally I can run it on, on my Mac. And people already started porting tools from XrmToolBox, which strictly Windows now I only have to cover two missing bits for me. It's, plugins Nicholas: Plugin registration. Yeah. George: and plugin registration. Sorry, two bits. One is writing and plugin because it's still not, Nicholas: Oh George: it's still 4.7. One or 4.72, whatever's the official highest version you can go.

It's still windows only. So have to fire up, like virtual machine oh, blindly write code. Compile it with, you know, GitHub actions and, keep my finger crossed as it works. And deploying. now becomes one step closer to reality because it is possible to Write tool. I think, Tanguy at some point did have, PRT equivalent inside XrmToolBox, but it's kind of fell behind a little bit. now that you can do, you know, pac tools PRT on command line and it pops

the registration tool on Windows. kind of having it inside Xon toolbox. It wasn't, it isn't a huge advantage because they did that couple capabilities, couple new flags. So you continuously need to monitor and make those changes. So I think PRT inside, XRM Toolbox, is somewhat behind, but, I need to take a look maybe, Ask Claude to port the source code and see what comes out and do plugin registration on, you know, on Mac. And then we are one step closer.

So the moment they release support for.net, modern net, whatever they're gonna support, nine 10. If they release that I'm all set, then you can build, compile, like for example, Azure functions. I can build them locally absolutely fine, either.net or Node or what's not. it's, it's definitely fine. that's about it, I mean. There is no other news. It's all good news in Power Pages world. kind of struggled to come up anything exciting that happened, besides these,

anything that we should know about? Nicholas: No, I think those are the, those are the big highlights. George: Yeah, it happened quietly over the Christmas New Year break and it's time for people to jump in and enjoy. Yeah, I need to put together a sample I promised to a friend of mine to demonstrate payments using server side logic, how simpler it becomes Nicholas: Mm-hmm. George: because about, I think over two years ago, I did payments that involved callbacks to power automate using power automate as a webhook for stripe.

And then it calls and you, it's JavaScript and some processing and, Azure function if you want, to be a little bit more responsive. it was a little bit messy. It worked, but there's too many moving parts and too many things to take care of. Whilst now it should be super, super duper straightforward. I'll see if I can wire it to the payments table that already exist Stripe as a provider is wired in, but payments can take any provider you feel like.

It's just a record of money exchange in hands. I'll take a look, see how difficult or easy it is. that would be a good example for service side logic. Nicholas: I look forward to reading that George: Since we've got couple minutes I use it to do a plug. I was whinging about LinkedIn, but I did do a, a good post of my own. I created, Entra ID auto clicker. It's a browser plugin anytime it sees the, do you want to stay signed in dialogue, it just dismisses it automatically. And it's got like a bunch of settings.

Do you wanna click? Yes. Do you wanna click? No. Do you wanna check the box? Never ask me again. It multilingual, so it supports like if you, if you run in a different language it, supports that. So you, you still need to translate the messages and stuff, if you want to support your own language. In my browser environment I haven't seen that dialogue since I added that in. It even has, a, a countdown. So if you say, Ooh, I wanna see the dialect, but I don't wanna move a muscle. So you'll see the dialog and then it goes like nine to eight.

I'll put the link in show notes. a, it's a simple browser extension. I don't wanna put it on, a web store it's simple installation from the folder. The code is public, so you just add it in and it really makes life simpler because you don't see this dialog ever in your browser. Nicholas: I look forward to installing that. George: On That note, until next time. And, looking forward to other improvements in Power Pages. Team has been on the roll. Nicholas: Yep. we're gonna be getting into, the next release wave, so we'll see what they've got. Cooking for that. George: Looking forward to that too. Thank you very much and until next time,

Nicholas: Thanks George.

Open the transcript file

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. Hot SPA time machine in Power Pages

    Oct 19, 202633 minAudio

    AI agent wrote, compiled, and deployed a full Dataverse plugin for George in under thirty minutes with DLL, custom API, pre/post steps and all, rendering him (George, that is) obsolete. This aside, we cover the new...

    Credit the people on this episode

  2. The Very Last Release Wave

    Oct 5, 202627 minAudio

    Better late than never: we look back at what Microsoft put in the Power Pages section of the last-ever Power Platform release wave. The twice-yearly release-wave model is now being replaced by continuous updates on the...

    Credit the people on this episode

  3. Hide your dirty laundry on the server-side

    Jan 22, 202628 minAudio

    15 years too late but it's finally here: server-side logic in Power Pages. What does it change in practice? Unlike Azure Functions, it's just another Power Pages asset that can be added to Power Platform ALM. Perfect...

    Credit the people on this episode

  4. Contacts Are Users Too - Now with Dataverse Privileges

    Oct 6, 202519 minAudio

    It's one of the biggest Power Pages updates we've seen in years, and we're excited about what it means for the future. We talk about the newest Power Platform release and its biggest change - bringing Power Pages...

    Credit the people on this episode

  5. End Of The World As We Know It: Security Leaks In Power Pages

    Aug 17, 202534 minAudio

    In this episode, we take a close look at the history of security issues in Power Pages. We start with the early days - when simple misconfigurations like unchecked table permissions and enabled OData feeds led to major...

    Credit the people on this episode