Announcement

Collapse
No announcement yet.

Buttons - List & Detail views.

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

  • Buttons - List & Detail views.

    Folks;

    I have added an entity ("Test") with a few fields - It works fine.

    I have then edited /custom/Espo/Custom/Resourses/metadata/clientDefs/Test.json & added:

    Click image for larger version

Name:	image.png
Views:	155
Size:	38.5 KB
ID:	98150
    line 27 (comma) -> line 30

    It works (I have also created the "js" files to add the buttons & action the buttons (this also works fine)

    When I add a new line at 30
    Click image for larger version

Name:	image.png
Views:	126
Size:	6.5 KB
ID:	98151

    It breaks (obviously this "json" is wrong).

    Has anyone added buttons to both the list & detail views of an entity in this manner?

    Regards
    David.

  • #2
    Check your json here: https://jsonlint.com/
    Sometimes, when you copy code, it may happen, that the browser adds hidden characters, which cause the json to be invalid.

    Comment


    • #3
      Originally posted by rawiri View Post
      Folks;

      I have added an entity ("Test") with a few fields - It works fine.

      I have then edited /custom/Espo/Custom/Resourses/metadata/clientDefs/Test.json & added:

      Click image for larger version  Name:	image.png Views:	12 Size:	38.5 KB ID:	98150
      line 27 (comma) -> line 30

      It works (I have also created the "js" files to add the buttons & action the buttons (this also works fine)

      When I add a new line at 30
      Click image for larger version  Name:	image.png Views:	9 Size:	6.5 KB ID:	98151

      It breaks (obviously this "json" is wrong).

      Has anyone added buttons to both the list & detail views of an entity in this manner?

      Regards
      David.
      You have a wrong syntax there it should not be ("list": "views/test/list") it should be as below:

      PHP Code:
      "views": {
          
      "detail""custom:views/test/detail",
          
      "list""custom:views/test/list"
      }​ 
      Rabii
      Web Dev

      Comment

      Working...
      X