Announcement

Collapse
No announcement yet.

How to add contact to targetlist using formula?

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

  • How to add contact to targetlist using formula?

    Hello,
    How to add contact to targetlist using formula?
    I try use:
    HTML Code:
    record\relate('Contact', $id_contact, 'targetLists', '???')
    but, target list has not id

  • #2
    you should use the id of the foreign entity which is the target list as below:

    PHP Code:
    record\relate('Contact'$id_contact'targetLists'$tagertListId
    Rabii
    Web Dev

    Comment


    • #3
      Or if you are using formula e.g in your contact formula script you would do something as below:

      PHP Code:
      entity\addLinkMultipleId('targetLists'$tagertListId
      This will link both entities
      Rabii
      Web Dev

      Comment


      • #4
        thank you

        Comment


        • #5
          I notice you guy use
          $ without declaring anything
          For $tagertListId​=="someID"

          We don't need do this? Or it was omitted in this thread?

          Comment


          • #6
            i am just sharing an exmaple $targetListId would be a variable that store the id of the target list found e.g

            PHP Code:
            $targetListId record\findOne('TargetList''createdAt''desc''name=''Main Target List');

            entity\addLinkMultipleId('targetLists'$tagertListId); 
            Rabii
            Web Dev

            Comment


            • esforim
              esforim commented
              Editing a comment
              That what I expecting, I was thinking there was some build in variable feature.
          Working...
          X