what following code means?

mdsr
Member Posts: 163
CASE CountryRegionCode OF
'',"Country/Region Code":
EXIT("Country/Region Code");
ELSE
EXIT(CountryRegionCode);
END;
'',"Country/Region Code":
EXIT("Country/Region Code");
ELSE
EXIT(CountryRegionCode);
END;
0
Best Answer
-
It means the same as
IF CountryRegionCode = '' THEN EXIT("Country/Region Code") ELSE EXIT(CountryRegionCode);
5
Answers
-
It means the same as
IF CountryRegionCode = '' THEN EXIT("Country/Region Code") ELSE EXIT(CountryRegionCode);
5 -
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.");
SalesHeader.INSERT(TRUE);
COMMIT;
PAGE.RUNMODAL(PAGE::"Mini Sales Credit Memo",SalesHeader)0 -
Hi mdsr,
hier you can find information about c/al (here are the ones that could help you):
https://docs.microsoft.com/en-us/dynamics-nav/setrange-function--record-
https://docs.microsoft.com/en-us/dynamics-nav/c-al-repetitive-statements#exit-statement1 -
@Duikmeester
isn't the first code something likeIF CountryRegionCode IN ['',"Country/Region Code"] THEN EXIT("Country/Region Code") ELSE EXIT(CountryRegionCode);
@mdsr please use the code-tag to post code0 -
thanks Jan870
-
@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.-1
-
@Duikmeester you are right, i missed that0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions