top.aras包含了aras前端大部分的API
/* * uiShowItem * 打开物体视窗 * parameters: * 1) itemTypeName - may be empty string if item is in client cache * 2) itemID - obligatory * 3) viewMode - 'tab view' or 'openFile' * if not specified aras.getVariable('viewMode') is used * 4) isTearOff - true or false, if not specified aras.getVariable('TearOff') is used */ //ex. top.aras.uiShowItem("work order","ddddddddddddddddd");
/*刷新物件視窗 * uiReShowItem * * parameters: * 1) oldItemId- old id of item to be shown * 2) itemId - id of item to be shown //usually itemId==oldItemId * 2) editMode - 'view' or 'edit' * 3) viewMode - 'tab view', ' or 'openFile' * 4) isTearOff- true or false. */ Aras.prototype.uiReShowItem = function (oldItemId, itemId, editMode, viewMode) //ex. top.aras.uiReShowItem("xxxxxxxxxxxxx","xxxxxxxxxxxxx","view","tab view");
/* * AlertError 錯誤訊息 * params: errorMessage = client-facing error message * technicalErrorMessage = the technical error message * stackTrace = the stack trace * ardwin = the window to use * */ Aras.prototype.AlertError = function Aras_AlertError(errorMessage, technicalErrorMessage, stackTrace, argwin) //ex. top.aras.AlertError("錯誤訊息"); //成功訊息 Aras.prototype.AlertSuccess = function Aras_AlertSuccess(msg, argwin) { this.AlertInternal(msg, 'success', argwin, new AlertInternalCustomizationBase()); }; //ex. top.aras.AlertSuccess("成功訊息");
/*回應對話視窗 Displays a confirmation dialog box which contains a message and OK and Cancel buttons. Parameters: message - string. Message to display in a dialog. win - parent window for the dialog. Returns: true - if a user clicked the OK button. false - if a user clicked Cancel button. */ Aras.prototype.confirm = function Aras_confirm(message, ownerWindow) //ex. var result=top.aras.confirm("choose"); Aras.prototype.prompt = function Aras_prompt(msg, defValue, argwin) //ex. top.aras.prompt("test","test");
尋找相關的API可以利用除錯器尋找 include.aspx,這邊會載入各種的Script~