RunWRDEntitySelectDialog (open)

Run an entity selection screen

Syntax

LOADLIB "mod::wrd/lib/dialogs.whlib";

INTEGER FUNCTION RunWRDEntitySelectDialog(OBJECT owner, OBJECT wrdtype, INTEGER entityid, RECORD options)

Parameters

OBJECT owner

Owner screen

OBJECT wrdtype

WRD type

INTEGER entityid

WRD id of the entity to preselect, 0 if none

RECORD options
STRING columns

Names of columns to show when selecting. Defaults to WRD_TITLE if present, WRD_GUID otherwise

RECORD entitycontext

Values that are set at creation/update, and cannot be edited

Return value

INTEGER

The id of the created or edited entity. 0 if the dialog was cancelled