Announcement

Collapse
No announcement yet.

validationFailure with enum type in 7.2.3

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

  • 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

  • #2
    These are not bugs. Please check release notes https://github.com/espocrm/espocrm/releases/tag/7.2.0 Possible Compatibility issues.

    Comment


    • #3
      Please check this:
      Click image for larger version

Name:	Screenshot 2022-09-18 at 10.03.55.png
Views:	428
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


      • #4
        I tried and it worked fine.

        What payload do you send? Query parameters not supposed to be used in POST requests.

        Comment


        • #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


          • #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


            • #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...
              X