I’m not writing a blog about every single (new) command in my “CRS AL Language Extension”. But this Sunday, I added an interesting one. One that I should have had created for a long time – but simply didn’t think of it, until Daniel (TheDenster.com) explicitly asked for it on GitHub.
Just imagine, you’re building an app, with many pages, and you want to build a page, test it, build the next one, test it .. . You kind have to:
– Publish the app
– Run the object after the app was published
The request was simple: combine both steps in one command in VSCode:
Publish & Run Current Object
And personally, I have been using it all day :-). So I thought – let’s just share it, so people know it exists and don’t have to find out by accidentally running into it ;-).
How to run it
Well, it’s simple, just:
What does it do .. exactly!
Well, it IS going to run a command from the “AL Language” extension first. The exact statement is this one:
The reason why I’m running the “without debugging” version, is because it’s the only way for me to mitigate that 2 browser tabs will be opened. Because the publish-step will open a tab, and then the “Run Object” (which is simply opening an URL) will open another tab.
You might say: “dude, you got a setting for that in the launch.json”. And you are right. In the launch.json, we can set the launchbrowser to “false”:
This only works with the command “publish without debugging”, not with the normal F5. So .. that’s why I’m using this command ;-).
You might have been using the “Run Current Object” already in the past.
Well, this still exists, and has a keyboard shortcut for it. I didn’t do that for the new command, but do know, you can do that yourself! You can even take this keyboard shortcut, and attach it to this new command.
Simply go into
Find the command and press the “+” sign on the left of it
Now, press the keyboard shortcut that works best for you – you can even override another one, like I did here to override the already existing “Run Current Object” shortcut:
Now you’re done.
Cool!, do note that it does only work for Page,Report and Table.
And Query 😉
It dosen’t work for me.
It gives me this error:
HTTP Error 502.5 – Process Failure
Sorry to hear – never seen this – wouldn’t know how to mitigate it 🙁
It doesn’t work for me too.
same Error 502.5
Only in BC17
Wouldn’t changing startupObjectId be enough (and changing it back once it’s done)? That way, you’d also be able to debug the object.
Could be – but it’s based on the function “Run Object” I already had, that does not use the F5 (publish) command at all .. so ..
But yes, I could do that.
I’m using this Tool in BC 14. It’s perfect!!
But i can’t start Run Current Object in BC 17.
I got HTTP Error 502.5 – Process Failure
What can I say? Looks like you have a connection failure.. . You can open an issue on my github and report with more details (how you set up your enviromnents).
I had this problem. I was fixed for me by adding this setting:
Its not working in BC19 !!
HTTP Error 503. The service is unavailable.