Get contact id after create new

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anhdt118
    Junior Member
    • May 2015
    • 13

    Get contact id after create new

    Hi!

    Can you tell me how to get last contact id inserted by method (storeEntity($entity))?

    This is my code but it's ok if only my account is admin:

    --------------------------------------------------------------------------

    // set field value for contact entity $contactEntity

    $contactId = $this->storeEntity($contactEntity);

    --------------------------------------------------------------------------

    Thanks and best regards.
  • yuri
    Member
    • Mar 2014
    • 8455

    #2
    $id = $contactEntity->id
    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

    • anhdt118
      Junior Member
      • May 2015
      • 13

      #3
      Thanks you!

      Comment

      Working...