Announcement

Collapse
No announcement yet.

Custom value for entity id field

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

  • Custom value for entity id field

    Is there a way to set my own value for the id of an entity when creating a new entity? I need a way to code some logic using the API that creates two different entities and associates them, ideally using python.

  • #2
    The way I'm solving for this is a multi-step process, importing all the entities then exporting them with their ids to then link them. I'd like to accomplish this in a single step instead of multiple. If I could generate my own uuid and insert my own value for the id, it will simplify my procedure.

    Comment


    • #3
      Could this help: https://forum.espocrm.com/forum/exte...m-by-devcrm-it

      Comment


      • definitepotato
        definitepotato commented
        Editing a comment
        I don't think this would help unless I can link two entities using this UUID field. As I understand it, in order to link two entities I need the id field.

    • #4
      There's another way to simplify, by sending an API GET request as a List function after all the imports are completed. This will allow me to capture the id of the entities and create logic to link two entities, but there's a limit of 200 entities. If I try to set the maxSize beyond 200 I get a 403 error. Is this limit somewhere in settings or is this a limit of the API?

      Comment


      • #5
        in the folder data/config.php look for this line (around 239): 'recordListMaxSizeLimit' => 200,
        and change that value.
        But be aware not to exaggerate, as this could cause a timeout in the MySQL database and with many records can take a long time.

        Comment


        • definitepotato
          definitepotato commented
          Editing a comment
          I'll try this, thank you!

      • #6
        Looks like the best way to solve this is to continue increasing the offset parameter until I've exhausted the length of the list returned in an API GET request.

        Comment

        Working...
        X