Overloading Methods With JavaScript Control Add-ins

  • Post comments:9 Comments

Switching from C# to JavaScript to develop your control add-ins might get you scratching your head more often that your scalp, or nails for that matter, might be happy with.

One of those is overloading. In C#, this is a no-brainer:

However, when you want to do that in JavaScript, if you are not a JavaScript developer, making this work is not as straightforward as a regular JavaScript Joe would find it.

(more…)

Continue Reading Overloading Methods With JavaScript Control Add-ins

Passing JSON from JavaScript to C/AL–Part 2

  • Post comments:8 Comments

I stand corrected. A month ago I wrote about how to pass JSON from JavaScript to C/AL and then handle it inside, and what I wrote is not wrong, but I just figured a simpler way.

Too bad all this is not documented, but hey – that’s why blogging is fun.

(more…)

Continue Reading Passing JSON from JavaScript to C/AL–Part 2

Passing JSON from JavaScript to C/AL

  • Post comments:4 Comments

Yesterday, I said I was closing this year of blogging, but I wasn’t really. Closing a year with 39 posts, and leaving a question lingering, wouldn’t be too fair, would it? If you read my last postabout how to pass objects from C/AL to JavaScript, you must have wondered if it’s possible to also pass objects from JavaScript back to C/AL.

Wonder no more. It is. And here’s how.

(more…)

Continue Reading Passing JSON from JavaScript to C/AL

Passing strongly typed data to a JavaScript control add-in

  • Post comments:11 Comments

Many cool things often go undocumented. I’ve just stumbled upon one of those, and it comes in handy to close this year of blogging.

Imagine this situation: you have a server-side .NET object, that you want to pass on to the client. With the .NET System.Windows.Forms-based objects, you have to make the object serializable, deploy the object to the client-side Add-in folder, and then set the RunOnClient property on the C/AL variable to Yes.

However, if the client is not .NET-based, if it is a cross-client JavaScript-based one. You may think that it’s not possible to pass the custom object on to JavaScript code. And you may be wrong.

(more…)

Continue Reading Passing strongly typed data to a JavaScript control add-in