Announcement

Collapse
No announcement yet.

Customize View of custom module

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Customize View of custom module

    Hi All,
    I want to customize a custom module by adding a Map View into a custom section of the detail view as show in the image.
    Please can I achieve this?
    I tried already to follow this article but I cant seems to customize the detail view: https://docs.espocrm.com/development/custom-views/

  • #2
    Hi, do you want to add the map in the same detail panel or in a side panel ?
    Last edited by telecastg; 05-19-2020, 09:44 PM.

    Comment


    • #3
      In the detail panel

      Comment


      • #4
        You can add the map as the top corner field, as shown in this image from the Layout Manager, but since the map field height is bigger than a regular field, the map will 'push" the next row of data.

        See the attached images, I used a field "Tenant Signature' that is the equivalent of having a map field.

        The first image is the screen from Layout Manager and the second image is how the record actually looks.

        Click image for larger version  Name:	Layout example.JPG Views:	0 Size:	48.6 KB ID:	58506Click image for larger version  Name:	Detail View Example.JPG Views:	0 Size:	38.9 KB ID:	58507

        If the above is OK, you don't need to create custom views or templates, just use the Layout Manager

        To make it look exactly as your example you would need to change Espo's core detail record layout and that is something that I haven't done it yet, and for what I have seen, it is not a simple customization.

        If having the exact detail that you want important, you might want to check these extensions https://www.eblasoft.com.tr/shop and contact the developer.

        Comment


        • #5
          He wouldn't need to be concern about the Map height, that is editable using the Entity manager. For example in Contact:

          /#Admin/fieldManager/scope=Contact&field=addressMap

          Change the value of: Height (px)

          Comment


          • #6
            Yes, the height is adjustable but he probably wouldn't want the map to have the same height as a normal field to keep everything aligned . I believe that is why the map is usually displayed as the last row

            Comment


            • #7
              Thank you all for you reply.
              I end up by duplicating the address field type to create a new field type named "address-plus" where I have my customization and everything seems to be working great as I can add this field type to any entity type now.
              My problem now that this line var actualAttributePartList = this.getMetadata().get(['fields', this.type, 'actualFields']) || []; returns an empty array from client\c ustom\src\views\fields\address-plus.js
              where I have "actualFields" key well setup like this "actualFields":[
              "street",
              "city",
              "longitude",
              "latitude",
              "state",
              "country",
              "postalCode"
              ], in custom\E spo\Custom\Resources\metadata\fields\address-plus.json
              Please can somebody tell me what is wrong here? telecastg esforim
              Thanks
              Last edited by dodom2; 05-21-2020, 11:44 AM.

              Comment


              • telecastg
                telecastg commented
                Editing a comment
                Sorry, I can't help with code debugging. I suggest that you open the console in your browser and watch for javascript errors to trace back the bug.
                Last edited by telecastg; 05-21-2020, 08:21 PM.

              • esforim
                esforim commented
                Editing a comment
                Anything that is outside of availability of GUI is out of my skill level. As far as I go at the moment is using very basic CLI command that I recently learn for update.

                Silly question do you think that "\c ustom\src" part might be affecting it? That there "space" in there, not sure if that due to copy/paste or what. Same thing with "custom\E spo"
            Working...
            X