Announcement

Collapse
No announcement yet.

Is select-records.js responsible for creating productcategory.json file?

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

  • Is select-records.js responsible for creating productcategory.json file?

    Is client/modules/advanced/src/views/product/modals/select-records.js responsible for creating application/espo/modules/advanced/resources/metadata/clientdefs/ProductCategory.json?

  • #2
    No. The metadata files (data/cache/application/*) are generated from the JSON files in application/**/*.json

    The client/**/*.js | *.tpl files handle the presentation layer and any logic to make the user interface function.
    Last edited by alasdaircr; 01-12-2016, 11:43 PM.

    Comment


    • worldmiros
      worldmiros commented
      Editing a comment
      alasdaircr There is an interface when click the arrow up key in the quote entity->quoteitems. Do you know what files are responsible for that interface?

  • #3
    Yes - client/modules/advanced/src/views/product/modals/select-records.js is responsible for the modal dialog that appears when you click the up arrow in the QuoteItem row. It's specialized because the base select-records.js dialog doesn't know what a ProductCategory is.

    application/espo/modules/advanced/resources/metadata/clientdefs/ProductCategory.json just describes the fields and links of a ProductCategory entity.

    I'm not a dev and learned all this just by reading through the code. Get to grips with the ORM, metadata & creating entities first otherwise you'll struggle implementing anything.

    EDIT saw your other post. You'll just have to keep reading. Converting the quoteItem entity to support any entity type will be tricky I think. In particular there's no select-records dialog which allows you to switch the scope (entityName) while it's open.
    Last edited by alasdaircr; 01-13-2016, 01:27 AM.

    Comment


    • #4
      alasdaircr To filter results based on the data in the field in a .js or .json file, do you know the name for it? Maybe something like,
      Code:
      "filter": 
                      {
                          "status": ["completed","billed"]

      Comment


      • #5
        .js and .json are totally different - remember the JSON describes the metadata of the application.

        Not sure what you're asking sorry.

        Comment


        • worldmiros
          worldmiros commented
          Editing a comment
          This is related to the other post. I created a json file in the scope directory, then changed the scope to Task entity, so when I want to add an item to QuoteItems, Task items are listed. And Task items has status (not started, started, completed, billed, etc). When user want to add item, I just want the interface to display Task items whose status are only "completed" or "billed", but not sure if I should implementing that rule in a json or javascript file.

      • #6
        OK - let's stop adding stuff to this thread then. keep your questions over there. Yuri is telling you where to look, so you need to go and look for it first

        Users who have Active=true

        Comment

        Working...
        X