
Looping and control statements in Dynamics 365 for Finance and Operations
if() { //something goes here if() { //nested if } } else if (condition) { //else if logic goes here } else { //elese part goes here } switch(field) {

if() { //something goes here if() { //nested if } } else if (condition) { //else if logic goes here } else { //elese part goes here } switch(field) {

[DataField] class ModelID { /// /// /// /// /// public void lookup(FormControl _formControl, str _filterStr) { //super(_formControl, _filterStr); //Table Relations //select * from POLModelTable //where IsActive = Yes Query query

public class POLMobileServiceTable extends common { /// /// When i initialize a record, this method will be triggered /// This method is not responsible for saving the record to database

Scenario for the Dynamic queries in Dynamics 365 for Finance and Operations CODE public void dynamicQueries() { Query query = new Query(); QueryBuildDatasource qbdsPOLMobileServiceTable, qbdsPOLModelTable; QueryBuildRange qbrModelId; qbdsPOLMobileServiceTable = query.addDataSource(tableNum(POLMobileServiceTable));

internal final class POLDataManipulationCommands { /// /// Class entry point. The system will call this method when a designated menu /// is selected or when execution starts and this class

public void containerClasses() { container con; //Initialize container con = [“Serv001”, 897, 123]; //Insert into container conIns(con, 1, “Serv001”); conIns(con, 2, 1234.80); conIns(con, 3, 123); //Retrieve the value conPeek(con, 1);

public void collectionClasses() { //1. List //To add values to the list List lst = new List(Types::String); lst.addEnd(“Value-1”); lst.addEnd(“Value-2”); lst.addStart(“Value-3”); lst.addEnd(“Value-4”); //Ouput: Value-3, Value-1, Value-2, Value-4 //Enumerate the list ListEnumerator

ClassA { public void print() { print “ClassA”; } public void printClassA() { print “ClassA”; } } ClassB extends ClassA { public void print() { print “ClassB”; super(); } public



