on 10-09-2018 3:02 PM
Dear Experts,
We are developing with HANA Service Layer.
We want to call an Action from JavaScript like getting series numbering with "SeriesService_GetDocumentSeries" action.
Can you please advise how can we achieve this ?
Kind Regards,
Aggelos Galis
Placed an Idea at SAP customer influence: Please, vote for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aggelos, Sergei,
I have checked internally, B1 Services are not supported from SL Script Egine.
Sergei listed the Cancel and Close operations, the same applies for all B1 Services including the SeriesService you are trying to use.
You can ask for this requirement into our SAP Business One Idea place at: https://influence.sap.com/sap/ino/#/campaign/887, check the blog https://blogs.sap.com/2016/08/30/login-to-the-idea-place-for-sap-business-one-will-be-changed-on-sep... for more details.
Sorry Sergei, I read the answer too fast...
Regards,
Trinidad.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Trinidad, Aggelos, Sergei,
What if I want to extend SL functionality? I've seen the option of writing SL scripts and invoke them as if they were a sort of addon.
I have tried one of those scripts -https://172.19.25.11:50000/b1s/v1/script/test/test_items('A00006')- you can code GET, POST, PATCH, DELETE.
I am integrating a POS and my problem is that I need to know how many remaining items I have for a batch number in a specific warehouse (OBTQ Table)
I understand that from SL I can not do a HANA Query. Am I wrong?
Is there a way to go from SL to DI Core (DI API has an option to return a resultset from a query)?
Best Regards.
Hector.
Hi Aggelos,
I've got the response from the support and, unfortunately, it's not implemented yet.
The reply text:
Dear Sergei Travkin,
Currently script engine does not support actions such as cancel.
Below workaround can be applied from 9.3PL5 to Cancel an existing document through Service Layer:
A/P Invoice: POST /b1s/v1/PurchaseInvoices(XX)/Cancel
A/P Credit Memo: /b1s/v1/PurchaseCreditNotes(XX)/Cancel
As this functionality is currently missing in Service Layer, please kindly follow the instructions in note 1028874 for a request.
Thank you for your cooperation and understanding.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi mariatrinidad.martinezgea ,
Yes, if you check his reply you will see that he asked about the SE:
I am successfully using the services from an external tool (Postman in my case) but what I am trying, and I can't seem to find an example for, is to use these services from the script file that I deploy in the Extension Manager.
Hi Aggelos,
Have you checked the Service Layer documentation available with your Service Layer installation?
You can access it at: https://YOUR_B1H_SERVER:50000
The User Manual talks about generic Service Layer operations.
The API Reference give details of each one of the services and operations exposed.
In the API Reference page you can see a sample how to use each one of the services, for example for your specific case:
Invoke the method 'GetDocumentSeries' on this service by specifying the payload 'DocumentTypeParams' in the JSON format.
POST https://localhost:50000/b1s/v1/SeriesService_GetDocumentSeries
{
"DocumentTypeParams": {
"Document": "2",
"DocumentSubType": "C"
}
}
Hope it helps,
Trinidad.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First of all thanks for your quick answer.
I have already checked the Service Layer documentation (both the User Manual and the API Reference).
I am successfully using the services from an external tool (Postman in my case) but what I am trying, and I can't seem to find an example for, is to use these services from the script file that I deploy in the Extension Manager.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
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.