How to get a image when output List of all objects, or how to add a field with an image?
how get image
Collapse
X
-
Tags: None
-
Hello!
We built our system on EspoCRM and it's extension Real Estate. Now we're using it's REST API for our new frontend part.
When we're trying to get all real estates from rest : .../api/v1/RealEstateProperty
we're getting array with objects like this:
{
"id": "",
"name": "",
"deleted": false,
"description": "!2!",
"createdAt": "2017-06-29 13:41:50",
"modifiedAt": "2017-06-29 13:41:50",
"type": "Apartment",
...
}
It's ok, but we need to get also some special fields. For example, images of that object like this
"imagesIds": [
"59550399160bb425c",
"5955039c35968a7f1"
]
What should we do to change this REST's output?Comment
-
Set the method loadAdditionalFields in RealEstateProperty Service (better in custom folder)
Hi, In my Entity Opportunities is an 1:n Relation to a custom entity called "Kredite". The Entity "Kredite" has an not storable field
Comment
-
Hello.
Could you tell, which definite code should be used for loadAdditionalFields method in the RealEstateProperty service to get the imagesComment
-
Hi all, I have the same problem. I am using API to get information from properties but I don't know how to get images related to each property. I understood that I have to use loadAdditionalFields but I have no idea on how to implement it. I read also the suggested topic but still not being able to code. Do you have any other suggestion, please? Some working example?
Thank youComment
-
Howdy folks,
Did anyone ever figure this out? I've been banging my head on this for a few hours now with not much progress. I read the posts linked above and browsed the RealEstateProperty/Request Services and Controllers. Still not real sure what Tanya meant by "Set the method" especially. Any more clues anyone?
Thanks!Comment
Comment