4.21.2.1. Code executed in the browser (JS)

The JS code is only executed in the browser. This means that you only have access to what the browser also has access to. These are usually APIs, e.g. online or within the intranet, to retrieve data and display it to the user.

If you To make changes, first copy the template file at /libs/pappserver/webapps/3dfindit-enterprise/plugins/plugin.js to $SITESETUP/3df/plugins and change these then. Every file that exists there is a) accessible via web server and b) overwrites a possibly existing File.

this.onExampleButtonClicked = function (transferObject)
{
  // Retrieve data of currently selected table line:
  const tableData = await   window.Psol.Services.Table.getTableVertical(transferObject);
  // Get data from table line:
  console.log(tableData);
};

The transfer object is written to the console and contains information about the currently open part for further processing:

If the browser is integrated into a PDM system, in most cases it is also possible to access the PDM; but this depends on how it is integrated and is implemented differently. See for example these issues:

https://partconcept.cadenas.de/show_bug.cgi?id=131531

https://partconcept.cadenas.de/show_bug.cgi?id=120761

https://partconcept.cadenas.de/show_bug.cgi?id=119709