External link connection

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • tothewine
    replied
    I tried to use the same formula to connect the Appuntamento entity to the CAP entity, but it doesn't work

    // Aggiorna da Prospect

    indirizzoStreet = prospect.addressStreet;
    indirizzoCity = prospect.addressCity;
    indirizzoCountry = prospect.addressCountry;
    indirizzoPostalCode = prospect.addressPostalCode;
    indirizzoState = prospect.addressState;

    // Aggiorna CAP

    $capRecordId = record\findOne('CAP', null, null, 'name=', indirizzoPostalCode);

    ifThen(
    $capRecordId,
    capId = $capRecordId
    );

    Leave a comment:


  • tothewine
    replied
    thanks, it's correct

    Leave a comment:


  • lazovic
    replied
    tothewine,

    Many thanks.

    Please try to use the following formula script for the Prospect entity:
    Code:
    $capRecordId = record\findOne('CAP', null, null, 'name=', addressPostalCode);
    
    if ($capRecordId) {
        capId = $capRecordId
    }

    Leave a comment:


  • tothewine
    replied
    Click image for larger version

Name:	image.png
Views:	186
Size:	29.3 KB
ID:	114639
    Click image for larger version

Name:	image.png
Views:	151
Size:	43.4 KB
ID:	114640

    Click image for larger version

Name:	image.png
Views:	148
Size:	40.3 KB
ID:	114641


    Leave a comment:


  • lazovic
    replied
    tothewine,

    Please note that this solution will only work if you update the Prospect record or recalculate the formula in List View of Prospect records.

    If this does not help, please make the following screenshots:
    • Administration > Entity Manager > CAP
    • Administration > Entity Manager > Prospect > Fields > CAP
    • Administration > Entity Manager > Prospect > Fields > Address Postal Code

    Leave a comment:


  • tothewine
    replied
    Does not work

    the fields to connect are
    of the CAP entity "name"
    of the Prospect entity "cap = addressPostalCode"
    the layout is of the Prospect entity

    Leave a comment:


  • lazovic
    replied
    Hi tothewine,

    Your formula script is incorrect overall. Something like this might work (I'm not sure because I don't know the exact names of your fields and entities):
    Code:
    $capRecordId = record\findOne('CAP', null, null, 'name=', addressPostalCode);
    
    if ($capRecordId) {
        cAPId = $capRecordId
    }

    Leave a comment:


  • tothewine
    replied
    I tried this formula

    -----
    capRecord = record\findOne('CAP', 'name=', addressPostalCode);
    ifThen(
    not(string\isEmpty(capRecord)),
    cap = record\attribute(capRecord, 'id')
    );
    -----


    but the log gives me this error

    [2025-01-29 18:11:55] CRITICAL: (0) Before-save formula script failed. Could not handle 'order' for 'CAP'. :: .../application/Espo/ORM/QueryComposer/BaseQueryComposer.php(2240)

    Leave a comment:


  • tothewine
    started a topic External link connection

    External link connection

    Click image for larger version

Name:	image.png
Views:	219
Size:	246.6 KB
ID:	114607

    II wanted to link field 1 of a linked entity as field 2 of a record I imported.
    How can I do this.
    I installed version 9.0.2 without extensions​
Working...