Announcement

Collapse
No announcement yet.

Setting values in PHP

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

  • Setting values in PHP

    Hello,

    how can I set values of fields in entity using PHP? I don't know what .php file should I write functions to. Entity.php in /Entities, or /Repositories?

    And also, is this correct ? Thank you.

    public function setValue(Entity $entity) {
    $name->$entity->get('name');
    $entity->set('editor', $name);
    }

  • #2
    https://github.com/espocrm/espocrm/b...ities/Lead.php an example

    Your method could be workable, if you fix 2nd row
    $name = $entity->get('name');

    But you need to call this method somewhere

    Comment

    Working...
    X