YfcShowDetailPopupWithKeysAndParams

Description

This JavaScript function invokes a specified detail view within a modal dialog. You can pass parameters to the detail view by forming a string in the format of name1=value1&name2=value2 and passing this string as a parameter to this function.

This function appends the passed string to the URL that is used to invoke the view. Thus, the passed parameters are available in the request object to the called view.

Use this function in situations where the default key generated by the Presentation Framework to be passed on the detail view is not accepted by the detail view being invoked.

Syntax

yfcShowDetailPopupWithKeysAndParams(viewID, name, width, height, argument,keyName, entity, selectionKeyName, params)

Input parameters

viewID - Required. Resource ID of the detail view to be shown as a pop-up window. If passed as an empty string, the default detail view of the specified entity is displayed.

name - Required. Pass as blank space (" "). Not used.

width - Required. Horizontal size of the pop-up window. Measured in pixels. If passed as 0, a certain default width is used.

height - Required. Vertical size of the pop-up window. Measured in pixels. If passed as 0, a certain default height is used.

argument - Optional. Passed as the argument parameter to the showModalDialog() function that is used to show the pop-up window. This then becomes available in the modal dialog through the window.dialogArguments attribute. If not passed, a new Object is created and passed to the pop-up window.

keyName - Required. Name attribute of a control that contains the Entity Key that is required by the detail view. If it is not passed, defaults to the value EntityKey.

entity - Optional. Resource ID for the detail view being shown. If not passed, defaults to the current entity.

selectionKeyName - Optional. Name of the checkbox control that must be checked by the user before the pop-up window is invoked. If this name is not passed (or is passed as null), the check is not performed, and the pop-up window is invoked immediately.

params - Required. String containing parameters to be passed to the detail view being invoked. Use the syntax name1=value1&name2=value2. This appends the string to the URL invoking the detail view which enables the parameters to be available to the detail view of the requested object.

Return value

None.

Example

This example opens a custom detail page and passes some custom parameters to it.

yfcShowDetailPopupWithKeysAndParams('CSTOrder012','',800,600,new
Object(),'EntityKey','order','EntityKey',
'CustParam1=xml:/Order&CustParam2=process')