how to write Switch Case in X++ AX 2009?
sometimes you need to make a switch case to handle specific situation this example will help you to do this :
static str CompanyMapping(str CompanyName)
{
switch(CompanyName)
{
case "msk" :
return "hsk";
break;
case "moh" :
return "hod";
break;
case "mqh" :
return "haq";
break;
case "muh" :
return "huq";
break;
case "msh" :
return "hsh";
break;
case "mku" :
return "hkw";
break;
case "mad" :
return "had";
break;
case "mkh" :
return "hkb";
break;
}
return "";
}
Comments