Set a field compulsory.

hello...
I have add two field Freight Applicable(Boolean), Charge Item(Decimal)
but i have to known when Boolean field is true(checked) than decimal field will be compulsory.
how to do that.?

Comments

  • kylehardinkylehardin Member Posts: 257
    Because a second field (the boolean) is involved, you will have to write that code in the table OnValidate trigger for the decimal field the table. Something like this:

    Charge Item - OnValidate()
    IF "Freight Applicable" AND ("Charge Item" = 0) THEN
    ERROR('You've killed us all, you fool!');
    Kyle Hardin - ArcherPoint
  • HarikiranHarikiran Member Posts: 39
    Hi jeegen, for your scenario,

    The code should be written in
    Freight Applicable - OnValidate() trigger

    IF (Freight Applicable = TRUE) AND ("Charge Item" = 0) THEN
    ERROR('Charge Item field is compulsory');
    Harikiran BM | ERP Specialist
  • kylehardinkylehardin Member Posts: 257
    Arguably you need validate code in both fields, since you won't know what order the user enters them. But @harikiran is correct, it needs to also be done in the Freight Applicable field.
    Kyle Hardin - ArcherPoint
Sign In or Register to comment.