Monday 8 January 2018

Zooming : Calling One Form from another Form using Personalization

1. Open the main form you want to personalize and go to
  Help -> Diagnostics -> Custom Code -> Personalize

2. Add a record as seq 10
Description = Creating a menu
Level = Function
Trigger Event = WHEN-NEW-FORM-INSTANCE
This will set a trigger to fire every time we enters into form.
  On actions tab insert the values as
    Type = Menu
Description = Creating a menu
Menu entry = Menu 1
Menu label = <New menu name> Ex: XX_Child_Form

  Create a new record as seq 20
Description = Copy values and Call new form
Level = Function
Trigger event = MENU1
  On Actions tab select
Seq = 1
Type = Property
Description = Copy value for item
Object Type = Global variable
Target object = <Your target Field name> Ex : XX_Value
Property name = Value
Value = =:<Main Form Block Name>.<Field Name>   Ex:XX_MAIN_BLK.Source_Id

Seq = 10
Type = Buitlin
Description = Call Form
Builtin type = Launch Function
Function code = <Select Function code of the second form to be opened> Function name =<Select Function name of the next form to be opened>

3. Now open the Main form and select a record and go to Tools -> XX_Child_Form
Now go to Help -> Diagnostics -> Custom Code -> Personalize

4. Create a record for Seq =10
Description = Moving values from global variable
Level = Function
Trigger event = WHEN-NEW-FORM-INSTANCE

  Move to actions tab
Insert values as
Seq = 10
Type = Property
Description = Transferring values from global variable
Object type = item
Target object = <Child form block>.<Field name>
Property name = Value
Value = =:global.<Field name specified at target field in step 2 Actions tab seq 1>   Ex : :global.XX_Value
   Create a new record as
Seq = 11
Type = Builtin
Description = Move to next block
Builtin type = DO_KEY
Argument = Next_Block
   Create a new record
Seq = 12
Type = Builtin
Description = Move to next fielf
Builtin type = DO_KEY
Argument = Next_Item

2 comments: