Announcement

Collapse
No announcement yet.

Using "Foreign" Field in EspoCRM Formula

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

  • Using "Foreign" Field in EspoCRM Formula

    Hello,

    I am trying to use a foreign field (a read-only field from a related record) within a formula in EspoCRM, but it returns nothing. How can I properly access and use the value of a foreign field in a formula?

    Thank you for your assistance!

  • #2
    Hey

    share code here, it should work. what kind of relationship between the entities etc. below an example how to access accountType foreign field on contact (which the type field in account). This is tested in sandbox


    PHP Code:
    $id record\findRelatedOne('Account'id'contacts''createdAt''desc');

    $type record\attribute('Contact'$id'accountType');

    output\print($type);​ 
    Rabii
    Web Dev

    Comment

    Working...
    X