Skip to Content

How to update a UDF Value in AR/invoice uisng DIAPI ?

Hi Experts,

Here I explain My scenerio

1.I have created one sale order with 10 quantities and I select 10 serial number against that particular sale order.

2.Then I create the ARinvoice against that particular sale order.and I have one udf in Invoice screen i didn't enter any values in it

Now I need to update that udf value using DIAPI.

1.Is it possible to update a AR/Invoice screen Udf using DIAPI?

2.Is there any need to change SBO Post Transaction?

Please help me to solve this ..

Thanks Advance.

Add comment
10|10000 characters needed characters exceeded

  • Hi Edy Simon, DIEGO LOTHER and Manikandan. D,

    Update: We have checked this issue in detail and found the following:

    The line level UDFs on Marketing Documents are disabled in SAP Business One Client for update however you can update the line level UDFs via DI API under the following conditions:

    • You are working in the Brazil (BR) or Mexico (MX) localization.
    • Intrastat is enabled.
    • Sales employee is changed on row level.
    • You update the base price of gross profit.

    Refer to SAP Note 2318381 for more information.

    Kind regards,

    ANKIT CHAUHAN

    SAP SME Support

  • Get RSS Feed

1 Answer

  • Oct 07, 2017 at 10:25 PM

    Hi Manikandan,

    Yes, it is possible to update an UDF on invoice document and no, you don't need change anything on SBO Post Transaction.

    A sample how to update an UDF on header of the document:

    Documents oInvoice = oCompany.GetBusinessObject(BoObjectTypes.oInvoices);
    if (oInvoice.GetByKey(149))
    {
        oInvoice.UserFields.Fields.Item("U_yourfieldname").Value = "aaa";
        if (oInvoice.Update() != 0)
            MessageBox.Show(oCompany.GetLastErrorDescription());
    }
    

    Hope it helps.

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Edy Simon, DIEGO LOTHER and Manikandan. D,

      Update: We have checked this issue in detail and found the following:

      The line level UDFs on Marketing Documents are disabled in SAP Business One Client for update however you can update the line level UDFs via DI API under the following conditions:

      1. If you are working in Brazil or Mexico Localization.

      2. If Intrastat is enabled.

      We are checking it for more conditions and will keep you updated about the same.

      Kind regards,

      ANKIT CHAUHAN

      SAP SME Support