how get image

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vlad88vlad
    Junior Member
    • Jun 2017
    • 5

    how get image

    How to get a image when output List of all objects, or how to add a field with an image?
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello
    You can create a field in Entity Manager with a type Image. You can add this field to detail or list view with Layout Manager

    Comment

    • vlad88vlad
      Junior Member
      • Jun 2017
      • 5

      #3
      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

      • tanya
        Senior Member
        • Jun 2014
        • 4308

        #4
        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

        /#Admin/layouts/scope=Meeting&type=list where I am talking about... Hello guys. I am trying to make simple meeting management tab on my Espo. Could you

        Comment

        • vlad88vlad
          Junior Member
          • Jun 2017
          • 5

          #5
          Hello.
          Could you tell, which definite code should be used for loadAdditionalFields method in the RealEstateProperty service to get the images

          Comment

          • Letsgetlost
            Junior Member
            • Apr 2018
            • 12

            #6
            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 you

            Comment

            • dylanbaxter
              Junior Member
              • Oct 2018
              • 1

              #7
              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

              Working...