Customize field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gadnuk
    Junior Member
    • Jun 2017
    • 15

    Customize field

    I'm having trouble trying to figure it out on how to customize a field that was created in ui wich belongs to a ui created entity. The field is date format and is visible in the list view of that entity. I want to give it a special style when that date is 1 week ahead or so.
    Thanks
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello
    You need to define the field view in entityDefs, in your view set the template. What step is difficult?

    Comment

    • Gadnuk
      Junior Member
      • Jun 2017
      • 15

      #3
      I've set the view of the field in entityDef and copied the list from fields template(date) to /client/custom/res I find difficult to compose the view for that particular field.
      Is this a correct approach?(photo)
      Thanks
      Last edited by Gadnuk; 06-19-2017, 12:10 PM.

      Comment

      • tanya
        Senior Member
        • Jun 2014
        • 4308

        #4
        as example you can use application/Espo/Modules/Crm/Resources/metadata/entityDefs/Task.json dateEnd field
        the second parameter means what to include.
        do you have a file client/src/views/fields/ziDeNastere.js ?

        Comment

        • Gadnuk
          Junior Member
          • Jun 2017
          • 15

          #5
          It's there where it should be? i have the file in client/custom/src/views/ziDeNastere. The one in the previous post.

          Comment

          • tanya
            Senior Member
            • Jun 2014
            • 4308

            #6
            if you have the file client/custom/src/views/ziDeNastere,js (better client/custom/src/views/zi-de-nastere), you need to set in view (entityDefs) "view": "custom:views/zi-de-nastare"

            examples:
            By default [Date] value formatted as [Today] \ [Yesterday] \ [18 May] ... but how to format is always as [18.05.2017] ? What shoud be changed in list.js and

            http://forum.espocrm.com/forum/devel...ending-e-mails
            Last edited by tanya; 06-19-2017, 01:24 PM.

            Comment

            • Gadnuk
              Junior Member
              • Jun 2017
              • 15

              #7
              It worked after all. My page is loading. I'm not sure how can I get the value from each row and read it?
              Thanks.

              Comment

              Working...