on 02-10-2010 10:14 PM
Hi there,
I would like to change an approval status (WddStatus) of draft documents using DI API. Is it possible? I can find neither any object nor a service to do that.
I have found two posts:
SAP B1 2007, SP01, PL09
Thanks for any suggestions.
D.
Edited by: Daniel Martinec on Feb 10, 2010 11:14 PM
How to do it:
SAPbobsCOM.ApprovalRequestsService oApprovalRequestsService = null;
SAPbobsCOM.ApprovalRequestParams oApprovalRequestParams = null;
SAPbobsCOM.ApprovalRequest oApprovalRequest = null;
SAPbobsCOM.ApprovalRequestDecision oApprovalRequestDecision = null;
oApprovalRequestsService =
(SAPbobsCOM.ApprovalRequestsService)MyCompanyService.GetBusinessService(
SAPbobsCOM.ServiceTypes.ApprovalRequestsService);
oApprovalRequestParams =
(SAPbobsCOM.ApprovalRequestParams)oApprovalRequestsService.GetDataInterface(
SAPbobsCOM.ApprovalRequestsServiceDataInterfaces.arsApprovalRequestParams);
int wddCode = 1;
oApprovalRequestParams.Code = wddCode;
oApprovalRequest = oApprovalRequestsService.GetApprovalRequest(oApprovalRequestParams);
oApprovalRequestDecision = oApprovalRequest.ApprovalRequestDecisions.Add();
oApprovalRequestDecision.Status = SAPbobsCOM.BoApprovalRequestDecisionEnum.ardApproved;
oApprovalRequestDecision.ApproverUserName = SAPB1UserName;
oApprovalRequestDecision.ApproverPassword = SAPB1Password;
oApprovalRequestsService.UpdateRequest(oApprovalRequest);
Hope it helps
D.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
Your request is totally reasonable, still it's absolutely impossible to implement it in B1 DI.
Further more, don't grow any expectations that SAP will change that in the future. I had a long discussion with product managers there and it's not even near their desk...
i beleive that by early April I'll have a solution of my own for that issue and many other painful issues regarding Approvals in B1.
You are welcome to contact me then.
Regards,
Gilan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I have read this post written a long time ago.
I want to create draft proposals that will be approved with the help of SDK with the c # program I wrote.
There is no problem in creating proposals and draft proposals.
However, I could not make a draft proposal to be approved. Do you have any suggestions on this subject? Thank you,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.