Skip to Content

How do we write code for: UseNegativeAmounts ?

Hi, everybody

We are closing our previous thread which is getting too crowded, and replacing it by this simplified one.

Previous thread:

Is it possible to make an add-on run automatically when a user logs in to SAP B1?

Please see attached picture which explains what we want to do.

capture.jpg

Any help is most welcome.

Thanks

Leon Lai

capture.jpg (219.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 14, 2016 at 12:09 PM

    Hi Leon,

    How can Edy said in previous post, you can update this information with the AdminInfo object of the DI API. The changes that you do in this object will be reflect for all user os the company.

    Sample code:

    Dim oCompanyService As CompanyService = oCompany.GetCompanyService()
    Dim oCompanyAdminInfo As AdminInfo = oCompanyService.GetAdminInfo()
    oCompanyAdminInfo.UseNegativeAmounts = BoYesNoEnum.tYES
    oCompanyService.UpdateAdminInfo(oCompanyAdminInfo)
    

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 15, 2016 at 01:34 AM

    Hi Leon,

    You need to take into consideration that your user might not have authorization to update this system wide property.

    Regards
    Edy

    Add comment
    10|10000 characters needed characters exceeded