Announcement

Collapse
No announcement yet.

Field validation failure on record "Duplicate" after 8.0.5 upgrade

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

  • DashingUno
    replied
    Thank you rabii , you first advice on clearing cache and rebuilding actually did help
    Just not with old records, anything new I create after clearing cache now works fine.

    Leave a comment:


  • rabii
    replied
    try this

    PHP Code:
    if (till != 'till1') {
        
    entity\setAttribute('offCurrency''RUB');
    }
    ​ 
    Can you also check fi you have any hooks - beforesave or aftersave that reset the offCurrency Field.

    Leave a comment:


  • DashingUno
    commented on 's reply
    Clear cache and rebuild unfortunately didn't help
    I also tried inputting this into the formula

    ifThen(till != 'till1', offCurrency="RUB");

    That didnt work either

  • rabii
    replied
    Try to reset the field to its default setting, clear cache and rebuild system that might resolve issue. otherwise check if you have any other formula that requires this field.

    Leave a comment:


  • DashingUno
    commented on 's reply
    Setting default currency to RUB in fieldmanager didn't help

  • DashingUno
    replied
    yuri

    Checked the browser request, you are right, "offCurrency" is passed as 'null'

    HTML Code:
    "sumCurrency":"RUB","offCurrency":null,"neoffCurrency":"RUB","createdById":"62hiddenb6931","createdByName":"D.U.
    Is this the part of the formula that can be doing this?
    HTML Code:
    ifThen(till != 'till1', off=0);

    Leave a comment:


  • yuri
    replied
    It requires sumCurrency to be a valid currency code. E.g. 'USD'.

    Somehow a not valid currency or null is passed.

    Leave a comment:


  • Field validation failure on record "Duplicate" after 8.0.5 upgrade

    Greetings, Im seeing this issue after upgrading to 8.0.5 that shows itself only when trying to duplicate a record

    WebUI error - Error 400: Bad request, field: off, validation: validCurrency
    HTML Code:
    Log error: [2023-11-15 05:46:39] WARNING: (400) Field validation failure; entityType: Debited, field: off, type: validCurrency.; POST /Debited; line: 56, file: /var/www/html/application/Espo/Core/Exceptions/BadReques>
    This entity is called Debited, and is used for registering spending from bank accounts and from till (cash)
    I understand that this has to do with currency, our Espo currently uses 2, Russian ruble and Thai Baht

    The entity structure that is afftected (as far as I understand from the logs)
    There is a field called "off", that is used as kind of a marker for another entity to determine either "off" or "on" state
    Formula used in the Debited entity:
    Code:
    ifThen(till == 'till1', off=sum);
    ifThen(till == 'till2', on=sum);
    ifThen(till != 'till1', off=0);
    ifThen(till != 'till2', on=0);
    ​
    The "off" field has a condition "visible only if sum = 9 999 999 999 rub"
    That was my way to hide it, since I want it non visible

    Not sure what direction to go from here, any help appreciated

    Edit: Probably should also specify that the upgrade was from 7.2.4, and the setup is on docker using :latest image
    Last edited by DashingUno; 11-15-2023, 06:40 AM.
Working...
X