Skip to Content
0

can not find script MyOrderEntity

Dec 04, 2017 at 04:48 PM

50

avatar image
Former Member

Hi all,

I'm trying consume a SL service with Postman, but I'm having an error:

{ "error": {
"code": 520,
"message": {
"lang": "en-us",
"value": "can not find script SBSS/MyOrderEntity"
} } }

I followed all necessary steps:

- I created the .js file that allows me to create Sales Order;

- I created .ard file that contains js file of service layer type;

- I put .zip file in Extension Manager.

So far, it seems to me that everything went well

I highlight that I did successfully Login, before consume the SL service: https://hanaserver:50000/b1s/v1/Login

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Maria Trinidad MARTINEZ GEA
Dec 05, 2017 at 09:13 AM
1

Hi Diogo,

Can you please

- share here the code of your .ard file

- check you have your script listed in the Extension Manager -> Extensions tab

- check for your current B1 companyDB the extension is listed in the "Company Assignment" tab

- share here the URL you are calling to run your script or the screen capture from Postman/Advanced Rest Client

Regards,
Trinidad.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Trinidade,

Attached the .ard file.

I have my script listed in my extension manager environment with ServiceLayerScript type.

I also have my scripts assigned to the company that I'm trying to call the service layer script.

- URL I'm calling after do successfully login: https://192.168.1.252:50000/b1s/v1/script/SBSS/MyOrderEntity

I hope you can help me.

Regards,

Diogo Carvalho

1
Maria Trinidad MARTINEZ GEA
Dec 14, 2017 at 10:12 AM
1

Hi,

I have investigated further and the problem seems to be due to the script (at least for Diogo).

I just replaced the file MyOrderEntity_Script.js with mine (latest version I did a fix last week) and it worked fine. Can you please take the new version of the script available in Git and see if it fixes your problem? Then you will be able to compare between yours an the latest one in Git.

https://github.com/B1SA/workshop

The fix I did last week was just a change in line 55 (maybe that is the reason also for the error message you are getting if nothing else different):

- return http.response.send(dataSrvRes.status, res.body);

+ return http.response.send(dataSrvRes.status, dataSrvRes.body);

Regards,

Trinidad.

Share
10 |10000 characters needed characters left characters exceeded
Carles Costa Dec 12, 2017 at 12:18 PM
0

Hi both of you,

I have the same error message.

I've take the 04 - Exercise source code.zip directly. I have only changed the NameSpace..


Is possible that we have to enable something? The two extensions have not checked the Enabled check in ExtensionManager, and I can't check them.

On the other hand, it works (in my case) if you change something in .ard. According PDF:

▪ Partnernmsp (partner name space)
▪ ExtName (name of the extension)
▪ ExtVersion (version number)
▪ Contdata (your contact information)
▪ Partner (name of your organization)

but I've filled the Partnernmsp field with the name of your organization and Partner field with the partner name space.

Thanks.

Share
10 |10000 characters needed characters left characters exceeded