on 09-03-2018 9:32 AM
Hello,
I have a question regarding Service Layer and retrieving pictures stored in the "Pictures Folder". Is there any way to get images from this folder via the Service Layer?
I am aware there is a possibility to get a "/ItemImages('item123')", which is one image stored in that folder, but I am looking to access multiple pictures in Item's User-Defined Fields (Type: General, Structure: Image).
Service Layer returns only filename for those UDFs in /items('item123').
Is it possible to get those images via Service Layer?
Thank You,
Ondřej Nekvinda
Hi Ondrej,
Unfortunately it seems like the operation as you want to do it is not possible.
Could you please check the following workaround and let us know?
1) Add an attachment by POST Attachments2 and get the returned the attachment entry.
2) Use the attachment entry to update the Item.UDF
3) To retrieve the Item.UDF as a picture, please read the attachment entry from Item.UDF.
4) Use Attachments2(entry)/$value to get the picture.
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 Ondrej,
Since "SAP Business One 9.1 patch level 12, version for SAP HANA" Service Layer has introduced a new stream entity ItemImages to support the CRUD operations of entity ItemImages. I suppose you already found it but want to share there the option.
https://help.sap.com/doc/0d2533ad95ba4ad7a702e83570a21c32/9.3/en-US/Working_with_SAP_Business_One_Se..., section 3.17Item Image
Regards,
Trinidad.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes, we are familiar with the ItemImages, but that does not help us to get multiple images referenced in the Item's UDF's. Our solution was to make the images accessible through web server and access them with simple HTTP call.
It would be great if we would be able to access files in Picture folder in some future version of B1H/Service Layer directly.
Regards,
Ondřej Nekvinda
Hi Trinidad,
We are developing this functionality in one of our SAPUI5 portals to show item images, and we executed the mount steps in the SUSE server as defined in section 3.17.1.
However, when we try to get an item image with verb
GET http://hanawin:50001/b1s/v1/ItemImages('i001')/$value
we get this strange error from Service Layer:
"error": { "code": -1000, "message": { "lang": "en-us", "value": "Fail to get the LINUX mount point for folder: \\\\hanawin\\images\\" }
We validated the cifs mount on SUSE and we can access successfully the B1 folder images...
Any ideas what might be the problem? We are using B1 9.2 PL07 version.
Manuel Dias
User | Count |
---|---|
98 | |
12 | |
10 | |
6 | |
6 | |
4 | |
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.