How do you approach this? only one boolean field on a list`

gvolkovgvolkov Member Posts: 196
say there is a list form. a shipment methods for example. i added a field called default (boolean). how do i make it so there can only be one default? meaning when there is one checked, and someone checks another one, that first one becomes FALSE.
Microsoft Certified Technology Specialist
Microsoft Certified Business Management Solutions Professional
Microsoft Certified Business Management Solutions Specialist

http://www.navisiontech.com

Comments

  • garakgarak Member Posts: 3,263
    edited 2008-10-16
    you must develop this on code.
    FIELDDEFAULT - OnValidate()
    IF FIELDDEFAULT THEN BEGIN
      ShipMethod.RESET;
      ShipMethod.SETFILTER(Code,'<>%1',Code);
      ShipMethod.MODIFYALL(FIELDDEFAULT,FALSE);
    END ELSE BEGIN
      ERROR('!! Stop !! Now, there is no DEFAULT Shipment Mehod');
    END;
    

    Regards
    Do you make it right, it works too!
  • gvolkovgvolkov Member Posts: 196
    i did something similar but didnt work, i will try your suggestion now. will let you know how it worked.

    Greg
    Microsoft Certified Technology Specialist
    Microsoft Certified Business Management Solutions Professional
    Microsoft Certified Business Management Solutions Specialist

    http://www.navisiontech.com
  • krikikriki Member, Moderator Posts: 9,110
    [Topic moved from 'NAV Tips & Tricks' forum to 'NAV/Navision' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.