Fetch Descriptions
The template has built-in functions to fetch descriptions from six different tables. Some tables have a corresponding 'D' table used to store translated descriptions. In those cases, the translated description based on the User Profile Language preference will be retrieved if one exists.
All descriptions are fetched using the fetchDescriptions function. The function takes an array of description keys and returns a description map. The array of description keys can contain any of the supported tables so the requests can be put into a batch to speed up processing. The tables supported by fetchDescriptions are listed below along with the function used to add to the description array:
Table Name |
Function Used |
---|---|
F0006/F0006D - Business Unit Master |
addBU(descArray, mcu) |
F4101/F4101D - Item Master |
addShortItem(descArray, item), addSecondItem(descArray, item), addThirdItem(descArray, item) |
F1201/F1201D - Asset Master File |
addAsset(descArray, numb) |
F0901/F0901D - Account Master |
addAccount(descArray, aid) |
F0101 - Address Book Master |
addAddressBook(descArray, an8) |
F0010 - Company Constants |
addCompany(descArray, company) |
Example - Fetch Descriptions
var descArray = []; addBU(descArray, "30"); addBU(descArray, "M30"); addAddressBook(descArray, "4242"); addSecondItem(descArray, "210"); fetchDescriptions(descArray, function(descriptionMap) { );
The descriptionMap variable contains name value pairs. The name corresponds to the key sent into the 'add' function. The value is a grouping of all of the descriptions returned for that key.
