validationFailure with enum type in 7.2.3

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Frantisek
    Junior Member
    • Dec 2021
    • 5

    validationFailure with enum type in 7.2.3

    Hi,
    I deal multiple issues with Field validation and enum fields. I can't say from which exact version because I did several upgrades at once.

    First issue was that it was not possible to create Opportunity with hidden enum field (not required field). I fixed it temporary with adding empty option between enum values. (but we don't want to allow to choose empty value in certain phase)

    Second issue is that I'm trying to create Case with REST API and I'm still getting {"messageTranslation":{"label":"validationFailure" ,"scope":null,"data":{"field":"type","type":"valid "}}}. It is again enum type and it is at all if I send a value or keep it empty. I have no temp solution for this.

    Frantisek
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    These are not bugs. Please check release notes https://github.com/espocrm/espocrm/releases/tag/7.2.0 Possible Compatibility issues.
    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

    • Frantisek
      Junior Member
      • Dec 2021
      • 5

      #3
      Please check this:
      Click image for larger version

Name:	Screenshot 2022-09-18 at 10.03.55.png
Views:	440
Size:	110.2 KB
ID:	83114
      I have default value. And this POST https://crm/api/v1/Case?name=mycase still return {"messageTranslation":{"label":"validationFailure" ,"scope":null,"data":{"field":"type","type":"valid "}}}.
      Even when I try POST https://crm/api/v1/Case?name=mycase&type=Incident the result is the same.

      Sorry where I have mistake?
      thank you
      Frantisek

      Comment

      • yuri
        Member
        • Mar 2014
        • 8440

        #4
        I tried and it worked fine.

        What payload do you send? Query parameters not supposed to be used in POST requests.
        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

        • Frantisek
          Junior Member
          • Dec 2021
          • 5

          #5
          I'm ashamed. It was my fault I had wrong code. Sorry for this and thank you for your time. Can we delete this post to avoid confusion for others?

          Comment

          • Adam_KSA
            Junior Member
            • Mar 2022
            • 18

            #6
            There is another problem with enum fields. More information here : https://forum.espocrm.com/forum/bug-...ining-entities
            In big short : Auto change value from empty field to first value from enum during edit entities.

            Comment

            • criffoh
              Member
              • Jun 2020
              • 55

              #7
              You can change field type to varchar in custom entityDefs keeping options and you will be able to add values out of the list.

              Comment

              Working...