on 12-05-2008 9:55 AM
Hi,
Please let me know how can i define the filed primary key.
Let me know what code i have add to make this field as primary key.
Try
oUserFieldsMD = Nothing
oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
oUserFieldsMD.TableName = "@PSSIT_PMWCTYPE"
oUserFieldsMD.Name = "typedesc"
oUserFieldsMD.Description = "Type Desc"
oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
'oUserFieldsMD.Mandatory = SAPbobsCOM.BoYesNoEnum.tYES
oUserFieldsMD.EditSize = 60
lRetCode = oUserFieldsMD.Add
If lRetCode <> 0 Then
oCompany.GetLastError(lErrCode, sErrMsg)
MsgBox(sErrMsg)
Else
MsgBox("Field: '" & oUserFieldsMD.Name & "' was added successfuly to " & oUserFieldsMD.TableName & " Table")
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Hi,
U cannot have a primary key but u can do the following..
objUserFieldMD.Mandatory = SAPbobsCOM.BoYesNoEnum.tYES
Hope it helps,
Vasu Natari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.