cancel
Showing results for 
Search instead for 
Did you mean: 

How to Update User Max. Discount - Sales Using DI-API

former_member221340
Participant
0 Kudos

Hello,

I am using SAP Business One 9.1 PL03, and I am trying to add a user and set the MaxDiscountSales property using the DI-API, but it does not seem to be having any effect. This code


Users oUsers = (Users)DICompany.Company.GetBusinessObject(BoObjectTypes.oUsers);

oUsers.UserCode = "New User";

oUsers.MaxCashAmtForIncmngPayts = 1000.00;

oUsers.MaxDiscountSales = 100.00;

oUsers.MaxDiscountPurchase = 100.00;

oUsers.MaxDiscountGeneral = 100.00;

oUsers.Add();

results in a user being added, and MaxCashAmtForIncmngPayts = 1000, but with the MaxDiscountSales, MaxDiscountPurchase, MaxDiscountGeneral properties all still equal to 0.

If I open this user in Authorizations, and update these properties in the client, they are updated properly.

Is this a bug, or do I need to follow a different process to set these fields? I would very much like to create new users entirely through the DI-API.

It also appears that for some reason, the SDK Help file is missing the page for Users Object Members.

Thank you,

Mike

Accepted Solutions (1)

Accepted Solutions (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please repost above discussion at SDK forum for quick assistance.

Close this thread here with helpful answer.

Thanks & Regards,

Nagarajan

former_member221340
Participant
0 Kudos

Thank you Nagarajan,

I have posted this in the SDK forum as you recommended.

http://scn.sap.com/message/15585379

Mike

Answers (0)