Skip to Content
avatar image
Former Member

can not find script MyOrderEntity

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Dec 05, 2017 at 09:13 AM

    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.

    Add comment
    10|10000 characters needed 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

  • Dec 14, 2017 at 10:12 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 12, 2017 at 12:18 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded