Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Project Settings API > Methods

Project Settings API: getMasterKeys()

Scroll Prev Next More

 

Returns the fields that link the specified master table to the current detail table.

Syntax

settings.getMasterKeys(masterTable);

Arguments

masterTable

The name of a master table linked to the current table.

Return value

An array with two elements: masterKeys contains fields from the master table, and detailsKeys contains the corresponding fields from the current detail table. Both elements are empty if the specified table is not a master.

Example

Display the first pair of fields linking Orders to Order Details.

var settings = new ProjectSettings("Order Details");
var keys = settings.getMasterKeys("Orders");
 
MVCFunctions.Echo(keys["masterKeys"][0] + " -> " + keys["detailsKeys"][0]);

See also:

getMasterTables()

getDetailsKeys()