create custom entity not working!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ruslan
    Senior Member
    • Aug 2014
    • 102

    create custom entity not working!

    Hi,
    i have follow the "how-to-create-custom-entity" guide from http://blog.espocrm.com/development/...custom-entity/
    but it seems not working! i have recheck myself to see i didn't miss something but all have done as the guide.

    i have espocrm 2.5 version.

  • yuri
    Member
    • Mar 2014
    • 8455

    #2
    Hi

    At least a few people created their custom entities following the guide.
    Check what's in log (data/logs) and what's in browser console.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • Ruslan
      Senior Member
      • Aug 2014
      • 102

      #3
      [2014-09-06 05:14:50] Espo.ERROR: Json::decode():Syntax error, malformed JSON [] []
      [2014-09-06 06:08:50] Espo.ERROR: Json::decode():Syntax error, malformed JSON [] []
      [2014-09-06 06:09:18] Espo.ERROR: Json::decode():Syntax error, malformed JSON [] []
      [2014-09-06 06:09:33] Espo.ERROR: Json::decode():Syntax error, malformed JSON [] []

      here is the error but where is the Syntax error? why the log not give you the file that the error is there?

      Thanks

      Comment

      • yuri
        Member
        • Mar 2014
        • 8455

        #4
        Your json is invalid. Maybe ending comma.

        It's not a commercial application to ask "why not this does something". Correct to say: "It would be better if it will do something".
        Last edited by yuri; 09-06-2014, 07:03 AM.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • Ruslan
          Senior Member
          • Aug 2014
          • 102

          #5
          Hi yuri,
          i found my problem! now all works great.
          i just don't understand why we need to create task project?
          ​i want to use the core task, how can i make relationship between projects and core task? i want to be able to select the project in the "create task" Parent field.

          Thanks

          Comment

          • yuri
            Member
            • Mar 2014
            • 8455

            #6
            See how it's defined for Account - Task relationship and then replicate.

            metadata >> entityDefs >> Task
            fields >> parent >> options
            Add Project to the array

            metadata >> entityDefs >> Project
            links >> tasks
            {
            'type': 'hasChildren',
            'foreign': 'parent',
            'entity': 'Task'
            }



            If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

            Comment

            Working...