cancel
Showing results for 
Search instead for 
Did you mean: 

Form Id Automatic Change

Former Member
0 Kudos
41

Hi All,

  I have a issue in using user defined form in workflow.When opening this form via work flow then in form load event i get form id changed.???

if form id ABC Then i get ABC0,ABC1,ABC2.....

Please tell me about this....???

I m Stuck???

Thanks & Regards

Rahul

Accepted Solutions (0)

Answers (1)

Answers (1)

AdKerremans
Active Contributor
0 Kudos

Hi Rahul,

This is normal behaviour.

You should never make checks on the formUID, but on FormTypeEx.

Regards

Ad

Former Member
0 Kudos

hi A. Kerremans

My Code Is Here...

Public Sub ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean)

        Select Case pVal.EventType

            Case SAPbouiCOM.BoEventTypes.et_FORM_LOAD And pVal.FormTypeEx = "UDO_FT_B1ODTO" And pVal.Before_Action = False

                objform = objMain.objApplication.Forms.Item(FormUID)

MessageBox.Show(objform.UniqueID)

End Select

    End Sub

My Form Id Is:UDO_FT_B1ODTO

but get me:UDO_FT_B1ODTO0,UDO_FT_B1ODTO1,UDO_FT_B1ODTO3

Thanks and regards

Rahul

AdKerremans
Active Contributor
0 Kudos

hi Rahul,

These lines are strange:

Select Case pVal.EventType

            Case SAPbouiCOM.BoEventTypes.et_FORM_LOAD And pVal.FormTypeEx = "UDO_FT_B1ODTO" And pVal.Before_Action = False

                objform = objMain.objApplication.Forms.Item(FormUID)

MessageBox.Show(objform.UniqueID)

it should read

Select SAPbouiCOM.BoEventTypes.et_FORM_LOAD

     Case pVal.EventType

     if  pVal.FormTypeEx = "UDO_FT_B1ODTO" And not pVal.Before_Action then

     Begin

          objform = objMain.objApplication.Forms.Item(pVal.FormUID)

          MessageBox.Show(objform.UniqueID)

     End

End Select

Regards

Ad

Former Member
0 Kudos

I am Trying This But Get Form Id is UDO_FT_B1ODTO1

AdKerremans
Active Contributor
0 Kudos

Hi Rahul,

That is correct and how it should work.

Because it is possible to open a form multiple times the FormUID is made unique by adding a number to it.

What is the problem?

You always get the correct formuid in your event.

Regards

Ad