Form Control UI Actions [BSFN API]

Ever wondered, if we can enable/disable controls, change the font, hide/show grid columns, do subform actions from a BSFN?

Well, all those FDA system functions have an equivalent JDE API and can be used in a wide array of scenarios, like creating a pivot table from data.

The list of API’s are as as follows. (You can see the Control ID of a form control within the FDA.)

Form Control Actions

void ClearControlError(LPBHVRCOM lpBhvrCom, long lControlId);
void SetControlError(LPBHVRCOM lpBhvrCom, long lControlId, JCHAR* szErrorId);

void EnableControl(LPBHVRCOM lpBhvrCom, long lControlId, BOOL bEnable);
void ShowControl(LPBHVRCOM lpBhvrCom, long lControlId, BOOL bVisible);
void SetControlText(LPBHVRCOM lpBhvrCom, long lControlId, JCHAR* szText);
void SetControlDataDictionaryItem(LPBHVRCOM lpBhvrCom, long lControlId, JCHAR* szDDAlias);
void SetEditControlColor(LPBHVRCOM lpBhvrCom, long lControlId, int iColor);
void SetEditControlFont(LPBHVRCOM lpBhvrCom, long lControlId, int iColor, JCHAR* szFontName, int iHeight, BOOL bItalic, BOOL bStrikeOut, BOOL bUnderLine, BOOL bBold);

void EnableTabPage(LPBHVRCOM lpBhvrCom, long lTabControlId, long lTabPageId, BOOL bEnable);
void ShowTabPage(LPBHVRCOM lpBhvrCom, long lTabControlId, long lTabPageId, BOOL bVisible);
void SetCurrentTabPage(LPBHVRCOM lpBhvrCom, long lTabControlId, long lTabPageId);
void SetTabPageText(LPBHVRCOM lpBhvrCom, long lTabControlId, long lTabPageId, JCHAR* szText);

Grid Control Actions

void SetGridCellError(LPBHVRCOM lpBhvrCom, long lGridId, int iRow, long lColumn, JCHAR* szErrorID);
void ClearGridCellError(LPBHVRCOM lpBhvrCom, long lGridId, int iRow, long lColumn);

void EnableGrid(LPBHVRCOM lpBhvrCom, long lGridId, int iRow, long lColumn, BOOL bEnable);
void SetGridColor(LPBHVRCOM lpBhvrCom, long lGridId, int iRow, long lColumn, int iColor);
void SetGridFont(LPBHVRCOM lpBhvrCom, long lGridId, int iRow, long lColumn, int iColor, JCHAR* szFontName,
int iHeight, BOOL bItalic, BOOL bStrikeOut, BOOL bUnderLine, BOOL bBold);

void ShowGridRow(LPBHVRCOM lpBhvrCom, long lGridId, int iRow, BOOL bVisible);
void SetGridRowBitMap(LPBHVRCOM lpBhvrCom, long lGridId, int iRow, int iBitMapValue);
void SetGridRowFormat(LPBHVRCOM lpBhvrCom, long lGridId, int Value);/ *value 13= default, 14 = alternate* /

void ShowGridColumn(LPBHVRCOM lpBhvrCom, long lGridId, long lColumn, BOOL bVisible);
void SetGridColumnDataDictionaryItem(LPBHVRCOM lpBhvrCom, long lGridId, long lColumn, JCHAR* szDDAlias);
void SetGridColumnHeading(LPBHVRCOM lpBhvrCom, long lGridId, long lColumn, JCHAR* szText);

General Actions

void PushButton(LPBHVRCOM lpBhvrCom, long lControlId);
void SetControlFocus(LPBHVRCOM lpBhvrCom, long lObjectId);
void SetFormTitle(LPBHVRCOM lpBhvrCom, JCHAR* szTitle);
void SupressDefaultVisualAssitant(LPBHVRCOM lpBhvrCom);

Media Object Actions

void SetGridTextIndicator(LPBHVRCOM lpBhvrCom, long lGridId, int iRow, BOOL bVisible);

Text Block Control Actions

void AddSegment(LPBHVRCOM lpBhvrCom, long lTextControlId, JCHAR* szText, int iColor, JCHAR* szFontName, int iHeight, BOOL bItalic, BOOL bStrikeOut, BOOL bUnderLine, BOOL bBold, BOOL bClickable, long lSegmentId);
void RemoveSegment(LPBHVRCOM lpBhvrCom, long lTextControlId, long lSegmentId);
void UpdateSegment(LPBHVRCOM lpBhvrCom, long lTextControlId, JCHAR* szText, int iColor, JCHAR* szFontName, int iHeight, BOOL bItalic, BOOL bStrikeOut, BOOL bUnderLine, BOOL bBold, BOOL bClickable, long lSegmentId);

Combo Box Actions

void SelectItem(LPBHVRCOM lpBhvrCom, long lComboControlId, JCHAR* szKey);

Subform Actions

void EnableSubform(LPBHVRCOM lpBhvrCom, long lControlId, BOOL bEnable);
void ShowSubform(LPBHVRCOM lpBhvrCom, long lControlId, BOOL bVisible);
void UpdateParent(LPBHVRCOM lpBhvrCom);
void NotifyParent(LPBHVRCOM lpBhvrCom);
void NotifyChild(LPBHVRCOM lpBhvrCom, long lSubformId);
void TriggerDefaultChildAction(LPBHVRCOM lpBhvrCom, long lSubformId, int iDefaultAction);

You can see these API’s implemented in BSFN – B4210960

Leave a Reply