Please help solve an important problem using the Workflow or other formula.
Condition:
The client first registers on the third-party Terminal service and is assigned terminalAccountID (int) there.
Then this value is passed to ESPOCRM in the terminalAccountID (integer) field of the "Contact", with all other data for creating a new record.
The agent has an entry in "Contact" and is a user of the portal in ESPOCRM.
If a new "Contact" came via a referral link to a third-party Terminal from a "Contact" agent, then the terminalAccountID of this agent is transmitted in the terminalAgentAccountID field of the new "Contact" in ESPOCRM.
I made for the entity "Contact" Relationships with "Contact"
contactParentIB One-to-Many (field for agent)
and
contactsIB Many-to-One (field for attracted clients)
Questions:
1. Using what formula to establish a relationship link between Contacts if the condition is met?
ifThen(
terminalAgentAccountID != null && terminalAgentAccountID == contact.terminalAccountID,
entity\addLinkMultipleId('contactParentIB', 'contactId')
);
2. How to make the Agent see this new Contact in the portal?
Condition:
The client first registers on the third-party Terminal service and is assigned terminalAccountID (int) there.
Then this value is passed to ESPOCRM in the terminalAccountID (integer) field of the "Contact", with all other data for creating a new record.
The agent has an entry in "Contact" and is a user of the portal in ESPOCRM.
If a new "Contact" came via a referral link to a third-party Terminal from a "Contact" agent, then the terminalAccountID of this agent is transmitted in the terminalAgentAccountID field of the new "Contact" in ESPOCRM.
I made for the entity "Contact" Relationships with "Contact"
contactParentIB One-to-Many (field for agent)
and
contactsIB Many-to-One (field for attracted clients)
Questions:
1. Using what formula to establish a relationship link between Contacts if the condition is met?
ifThen(
terminalAgentAccountID != null && terminalAgentAccountID == contact.terminalAccountID,
entity\addLinkMultipleId('contactParentIB', 'contactId')
);
2. How to make the Agent see this new Contact in the portal?
Comment