cancel
Showing results for 
Search instead for 
Did you mean: 

how to get ItemUid for userdefined field

Former Member
0 Kudos

Hi all,

i am working on production order in that form i created one user defined field ie Vendorname(udf) for this i wanted to do validation but i am not able to do validation for that field.For other fields ie for predefined one i am able to do validation getting Item uid but for User defined field i am not able to do this giving Item uid. Can any one help me regarding this issue asap.

Regards

ANAND

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Anand,

i am not sure whether i had understood your problem or not

but if you are trying to validate a UDF then in before action true in validate event

if Pval.itemUid="U_Vendorname") then

'Do some thing

End if

Regards

Vishnu

Former Member
0 Kudos

Hi vishnu,

how ru doing? actually while doing like this if Pval.itemUid="U_Vendorname") then

End if

its displaying Error message actually i wanted when pressing button its get validate while without giving any data on that VendorName.Can explain breifly about my issue.

regards

ANAND

Former Member
0 Kudos

HI

use this code

If pVal.FormTypeEx = "URFORMTYPE" And pVal.BeforeAction = True And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.ItemUID = "URBUTTONUID" Then

If objForm.Items.Item("U_Vendorname").Specific.Value = "" Then

SBO_Application.MessageBox("ERRORMESSAGE")

BubbleEvent = False

End If

End If

If it helps please reward points

Regards

Vishnu

Nussi
Active Contributor
0 Kudos

i think his problem is he don't know how to access the userdefined fields in the form !

because he can do it with normal fields

anand, try this:

if (appl.Forms.GetFormByTypeAndCount((frm.Type * -1), appl.Forms.ActiveForm.TypeCount).Items.item("U_FIELD").Specific.Value = "xyz" ) then

end if

look in the sdk ui documentation for GetFormByTypeAndCount

the userdefined fields on the side are in a own form with type * -1