what following code means?

mdsrmdsr Member Posts: 163
CASE CountryRegionCode OF
'',"Country/Region Code":
EXIT("Country/Region Code");

Best Answer


  • mdsrmdsr Member Posts: 163
    edited 2019-05-16
    thanks sir,but what EXIT does here and what it mean?
    also can you explain what setrange actually deoes in following code
    SalesHeader."Document Type" := SalesHeader."Document Type"::"Credit Memo";
    SalesHeader.SETRANGE("Sell-to Customer No.","No.");
    PAGE.RUNMODAL(PAGE::"Mini Sales Credit Memo",SalesHeader)
  • Jan87Jan87 Member Posts: 24

    isn't the first code something like
    IF CountryRegionCode IN ['',"Country/Region Code"] THEN
      EXIT("Country/Region Code")

    @mdsr please use the code-tag to post code
  • mdsrmdsr Member Posts: 163
    thanks Jan87
  • DuikmeesterDuikmeester Hoorn, The NetherlandsMember Posts: 300
    @Jan87 if you convert it exactly. But functionally my code is the same but simpler. With your code if the variable EQUALS the field return the field else the variable. Means both are the same so it does not mather returning the one or the other.
  • Jan87Jan87 Member Posts: 24
    @Duikmeester you are right, i missed that :)
Sign In or Register to comment.