Skip to Content

Retuns - Edit UDF's Line Level

Hi SAP Experts

Is there a way to edit a UDF’s at line level for a Sales Return after the document has been saved.

Currently if the return is open it will allow me to edit UDF at document header level and I can edit the sale employee at line level but not my UDF at line level

Please advise?

Chris :-)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 15, 2016 at 03:26 PM

    Hi Chris,

    I know that is possible by SDK(DI API)

    Sample code in C#

                try
                {
                    Documents oReturn = oCompany.GetBusinessObject(BoObjectTypes.oReturns);
                    if(oReturn.GetByKey(your document key))
                    {
                        oReturn.Lines.SetCurrentLine(0); //define the line that you want update
                        oReturn.Lines.UserFields.Fields.Item("your field").Value = "your value";
                        if(oReturn.Update() != 0)
                        {
                            MessageBox.Show(oCompany.GetLastErrorDescription());
                        }
                    }
    
    
                }
                catch (Exception ex)
                {
                    //Do something
                }
    

    By the SAP B1 client, I believe that is not possible, maybe someone else in this board have other idea.

    Hope it helps.

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded