App


JavaScript Tutorial

Tutorial HomeJavaScript
The samples can differ based on your Razor base class or if you're running an old version.
Switch to Typed (2sxc 16+) Switch to Dynamic (Razor14 or below)

Use the 2sxc JS API to get Data

This page uses the sxc data API to get data from the backend and display it in a table with JavaScript.

In this tutorial you'll learn how to:

  • Create a $2sxc object using the current Module Id
  • Use the correct data source using .data()
  • Read data using the .getOne(id) query method
  • Read data using the .getAll() query method

Look at the content below to see the effect.