«

»

Oct 22 2014

Form Control UI Actions [BSFN API]

VN:F [1.9.22_1171]
Rating: 5.0/5 (2 votes cast)

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.

FDA Form Control ID

Find Form Control ID

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

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

Published under the license.

VN:F [1.9.22_1171]
Rating: 5.0/5 (2 votes cast)
Form Control UI Actions [BSFN API], 5.0 out of 5 based on 2 ratings
(Visited 578 times, 1 visits today)

About the author

Deepesh M Divakaran

Deepesh MD is more of a Gizmo Geek, and a techie.
A very experienced Technical Consultant on Oracle JD Edwards EnterpriseOne, and OneWorld. As a consultant he has worked for wide range of industries, from Manufacturing, Media, Oil & gas etc. and has worked on re-engineering modules, and areas of customization.
With a touch of class and understanding towards what ever he does, he is often regarded by his colleagues as the one stop answer for all Technical/Software related queries.

4 comments

Skip to comment form

  1. jerome

    Hello Deepesh,

    I managed to find the code for the BSFN (Files C and H) but where can I find the data structure?
    Thanks a lot.

    Jérôme

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    1. Deepesh M Divakaran

      The BSFN B4210960 is just a template. As for the DS definition, it will have to be used with respect to the API you are using.
      e.g. if you need to Enable/Disable a control – EnableControl(LPBHVRCOM lpBhvrCom, long lControlId, BOOL bEnable), here lControlID and bEnable would be the ones you will need to pass in from the Datastructure.
      Here lControlID can be viewed from the FDA – Form Control’s property browser. bEnable Flag would be either True or False based on if you want to Enable/Disable that control.
      This is very much similar to the CALLMAP implementation.

      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  2. David Leon

    Nice!!

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  3. amit mahajan

    Deepesh,

    I need real help on this.I used this APIs in C bsfn but function is crashing on server, though function is working fine on local. Any tips to resolve this problem. Your help is much appreciated.

    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

Leave a Reply