TargetList creation from custom entity?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • partomas
    Active Community Member
    • Sep 2018
    • 331

    TargetList creation from custom entity?

    Hello, If I understood correctly the TargetLists can be formed only from general entity reports:

    switch ($entityType) {
    case 'Contact':
    $link = 'contacts';
    break;
    case 'Lead':
    $link = 'leads';
    break;
    case 'User':
    $link = 'users';
    break;
    case 'Account':
    $link = 'accounts';
    break;
    default:
    throw new Error();
    }
    We have created our own "Subscription" entity. There are a link to accounts as well, but if I create report from this entity, I can't, or don't know how to, add these accounts to TargetList. Might be anyone can explain how to extend a TargetList creation variations.

    I need to use automation of TargetList formating.
    Now I get 500 error if I tried to sync my report from "Subscription" entity to TargetList. Espo.ERROR: (500) POST /api/v1/Report/action/syncTargetListWithReports; line: 3514, file: ...../Espo/Modules/Advanced/Services/Report.php
    Last edited by partomas; 03-17-2020, 01:42 PM.
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Hi Partomas,
    It is not supported for the link-multiple. For example relationship between Subscription and Account of One-to-Many or Many-to-Many is not supported.
    If you have a link type connection instead of link-multiple do next:
    1. Create a List Type report for Subscription to show all Account;
    2. Create a target list (Sync with Reports);
    3. Check a schedule for 'Sync Target Lists with Reports' job.

    Comment

    Working...