get current client language
companyinfo::languageId().
This blog is contains coding reference related to Microsoft AX 2012 and D365 finance and operations and Power platform
SRWare Iron: The Browser of the future | ||
SRWare Iron: The browser of the future - based on the free Sourcecode "Chromium" - without any problems at privacy and security Google's Web browser Chrome thrilled with an extremely fast site rendering, a sleek design and innovative features. But it also gets critic from data protection specialists , for reasons such as creating a unique user ID or the submission of entries to Google to generate suggestions. SRWare Iron is a real alternative. The browser is based on the Chromium-source and offers the same features as Chrome - but without the critical points that the privacy concern. We could therefore create a browser with which you can now use the innovative features without worrying about your privacy. We want our users to participate in our work and make the browser free to download under the name "SRWare Iron" into the net. What does Iron makes different? Read here. * Chrome and Google are registered trademarks of Google Inc. |
public void dataSetLookup(SysDataSetLookup sysDataSetLookup) { List list = new List(Types::String); Query query = new Query(); QueryBuildDataSource queryBuildDataSource; QueryBuildRange qbr; // Add the table to the query. queryBuildDataSource = query.addDataSource(tableNum(DependentDetails)); //add the range qbr = queryBuildDataSource.addRange( fieldnum(DependentDetails, PersonnelNumber)); // qbr.value(DirPersonUser::currentWorkerPersonnelNumber()); // qbr.status(RangeStatus::Locked); // Specify the fields to use for the lookup. list.addEnd(fieldStr(DependentDetails,DependentId)); list.addEnd(fieldStr(DependentDetails,Name)); sysDataSetLookup.parmLookupFields(list); // Specify the field that is returned from the lookup. sysDataSetLookup.parmSelectField('DependentId'); // Pass the query to the SysDataSetLookup so that the query is used. sysDataSetLookup.parmQuery(query); }
static void _ResetTTS(Args _args)
{
while (appl.ttsLevel() > 0)
{
info( strfmt("Level %1 aborted" ,appl.ttsLevel()));
ttsAbort;
}
}
Query query;
QueryRun queryRun;
QueryBuildDataSource qbds1;
QueryBuildRange qbr1, qbr2,qbr3,qbr4;
query = new Query();
qbds1 = query.addDataSource(tableNum(Table_Name));
if(Condition)
{
qbr1 = qbds1.addRange(fieldNum(Table_Name, Fieldname1));
qbr1.value("Value");
}
if(Condition)
{
qbr2 = qbds1.addRange(fieldNum(Table_Name, Fieldname2));
qbr2.value("Value");
}
if(Condition)
{
qbr3 = qbds1.addRange(fieldNum(Table_Name, Fieldname2 ));
qbr3.value("Value");
}
if(Condition)
{
qbr4 = qbds1.addRange(fieldNum(Table_Name, Fieldname3));
qbr4.value("Value");
}
queryRun = new QueryRun(query);
//This is for lookup with InnerJoin ////Write in Form Level Design>Field>Lookup public void lookup() { // create the query for the lookup Query query = new Query(); QueryBuildDataSource cpj; QueryBuildDataSource bol; QueryBuildRange qbr1; // Intantiantes a SysTableLookup object telling it which control activated the lookup, and // what table should be displayed inside the lookup form.(root table) //"Failed to execute query because no root data source on the form matches the root datasource on the query" //This error can occur when the wrong TableId is passed in SysTableLookup::newParameters(). //Make sure you use the table you want to do the lookup in (not the table you're doing for). SysTableLookup sysTableLookup = sysTableLookup::newParameters(tableNum(LTCustomerDetails),this); cpj = query.addDataSource(tablenum(LTCustomerDetails)); qbr1 = cpj.addRange(fieldnum(LTCustomerDetails,LTCustomerID)); qbr1.value(queryvalue('3')); //Join Table bol = cpj.addDataSource(tablenum(LTPurchaseDetails)); bol.relations(false); bol.joinMode(joinmode::InnerJoin); bol.addLink(fieldnum(LTCustomerDetails,LTCustomerID),fieldnum(LTPurchaseDetails,LTCustomerID)); //Add the query to the lookup form sysTableLookup.parmQuery(query); // Add fields that will be shown in the lookup as columns // Specify the fields to show in the form. sysTableLookup.addLookupfield(fieldNum(LTCustomerDetails,LTCustomerID)); sysTableLookup.addLookupfield(fieldNum(LTPurchaseDetails,LTCustomerName)); // Perform the lookup sysTableLookup.performFormLookup(); } example public void lookup() //on form level { Query query = new Query(); QueryBuildDataSource queryBuildDataSource; QueryBuildDataSource queryBuildDataSource2; QueryBuildRange queryBuildRange; SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(InventTable), this); sysTableLookup.addLookupField(fieldNum(InventTable, ItemId)); sysTableLookup.addLookupField(fieldnum(InventTable,NameAlias)); queryBuildDataSource = query.addDataSource(tableNum(InventTable)); queryBuildDataSource2 = queryBuildDataSource.addDataSource(tablenum(EcoResProduct)); queryBuildDataSource2.relations(false); queryBuildDataSource2.joinMode(joinmode::InnerJoin); queryBuildDataSource2.addLink(fieldnum(EcoResProduct,RecId),fieldnum(InventTable,Product)); queryBuildRange = queryBuildDataSource2.addRange(fieldNum(EcoResProduct,LTPurchaseOrderType)); queryBuildRange.value(enum2str(PurchTable.LTPurchaseOrderTypes)); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup(); }
switch (value)
{
case 1:
case 2:
case 3:
//do some stuff
break;
case 4:
case 5:
case 6:
//do some different stuff
break;
default:
//default stuff
break;
}
More info
add this logic into your lookup method and pass dimensionAttributeName = your dimension nameArgs args;
icon by Icons8