To know a record is already exist in an entity(Eg:Leads)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sujithraalink
    Member
    • Oct 2018
    • 94

    To know a record is already exist in an entity(Eg:Leads)

    configuring workflow from front end, how to check a record is already exist ? Please help
  • sujithraalink
    Member
    • Oct 2018
    • 94

    #2
    Iam new to espo, I do want to search with phone number in an entity. if phone number already exist i have to get its count >= 1. can i do it in actions in workflow or using formula.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8471

      #3
      Possible w/ formula function record\exists: https://github.com/espocrm/documenta...d#recordexists
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • Maximus
        Senior Member
        • Nov 2018
        • 2731

        #4
        Hello,
        it is very easy to find all records with empty or not empty field in entity. You just have only to run the search with the filter. See attachments.


        Attached Files

        Comment

        • sujithraalink
          Member
          • Oct 2018
          • 94

          #5
          Thanks Sir, I know this. but i want to make a check for duplicate entry and need to give a status on each duplicate entry.
          And I tried this as you said
          ifThen(record\exists('Contact', 'phoneNumber=', phoneNumber), flag = true). Here after a new record is created , trying to check phone number is already exists, if exists then need to update flag as true in newly created record. Please help.

          Comment

          • dreginald
            Member
            • Sep 2018
            • 89

            #6
            I tried creating this workflow and it is not working. It is showing Duplicate for every record created. Can someone advise me how to use this formula. Screenshot attached.

            description=ifThen(record\exists('Lead', 'phoneNumber=', phoneNumber), "Duplicate");

            Comment

            • dreginald
              Member
              • Sep 2018
              • 89

              #7
              With reference to my previous post, I have found a better way to identify the duplicate leads, by using record/count and filtering out all counts above 1.
              noOfLeadsWithSamePhoneNo=record\count('Lead', 'phoneNumber=', phoneNumber);

              Comment

              Working...