Skip to Content

Mandatory fields

Hi all,

I've been trying to add a mandatory UDF via SDK and it does not seem to create the field.

Dim Uf as UserFieldsMD = Company.GetBusinessObject(BoObjectTypes.oUserFields)

Uf.TableName = "@some_table"
Uf.Name = "anID"
Uf.Description = "some_desc"
Uf.Type = BoFieldTypes.db_Alpha
Uf.SubType = BoFldSubTypes.st_None
Uf.EditSize = 100
Uf.Mandatory = BoYesNoEnum.tYes
Uf.DefaultValue = "0"
RetCode = Uf.Add()

Return code is 0 which indicates success, but when checking SAP B1 no field is created.

Any ideias?

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2011 at 04:15 PM

    Hi,

    How many fields do you have for this UDT? What type of UDT is this?

    Thanks,

    Gordon

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2011 at 04:41 PM

    How quickly are you checking B1?

    It will seem like the field has not been added until you get the "All open windows must be closed" message and click yes - or you can close Business One and open again.

    If still not added, are you in a transaction?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 15, 2011 at 05:14 PM

    Hello all,

    This is embarrassing but the problem was a typo in the table name. I believe an exception should be thrown by the API, but that's just me.

    Thanks for taking the time to answer. Points to you.

    Best regards,

    Pedro Magueija

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.