Skip to main content

Posts

Department Wise

static void DeptWiseEmployeeList() {     HcmWorker               hcmWorker;     Name                    deptName;     while select * from hcmWorker     {         deptName="CIVIL";        // info(strFmt("%1",hcmWorker.primaryDepartmentName()));         if(dEPTnaME==hcmWorker.primaryDepartmentName())         {             info(strFmt("%1",hcmWorker.PersonnelNumber));         }     } }

County Full Name

static void CountryFullName(Args _args) {  name  country,fullname;     HcmWorker hcmworker;     HcmPersonPrivateDetails         hcmPersonPrivateDetails;     Logisticsaddresscountryregiontranslation  logisticsaddresscountryregiontranslation;     Logisticsaddresscountryregion               logisticsaddresscountryregion;    country=hcmPersonPrivateDetails::findDetailsByPersonnelNumber("000002").CitizenshipCountryRegion;     select logisticsaddresscountryregion where  logisticsaddresscountryregion.CountryRegionId==country;     fullname=logisticsaddresscountryregion.displayName();     info(fullname); }

Check the Employee having Leave or Not..

static void checkIfEmployeeHasLeave(Args _args) {     Date periodStartDate;     Date PeriodEndDate;     PersonnelNumber employeeId;     str60 payComponentId;     LevpayLeaveSettlementTable levpayLeaveSettlementTable;     LevpayLeaveSettlementCalculationDetails levpayLeaveSettlementCalculationDetails;     Levpaypayrollperiod levpaypayrollperiod;     periodStartDate = 24\11\2014;     periodEndDate = 15\3\2017;     employeeId = "LBR-0045";     select levpayLeaveSettlementTable         where levpayLeaveSettlementTable.EmployeeId == employeeId             && levpayLeaveSettlementTable.WorkFlowStatus == LevpayWorkFlowStatus::Approved;     if (levpayLeaveSettlementTable)      //info(strFmt("Till here"));     {   //info(strFmt("Till here2"));     while s...

SalesOrder Classes and Tables & Purchase Order classes and Tables

SalesOrder Classes and Tables: SalesTableType  and  SaleslineType  classes will get called while  creating the SalesOrders . SalesFormLetter_Confirm SalesFormLetter_Invoice SalesFormLetter_PackingSlip SalesFormLetter_PickingLlst classes will be used to post the sales order at various document status ( packing, invoice  etc). Tables: SalesTable  contains all SalesOrder headers regardless whether they have been  posted  or not. The  SalesParmTable  and  SalesParmLine  contains detailed information regarding posting sales headers and Lines. CustConfirmJour  and  CustConfirmTrans  tables contains all Sales  Confirmation  headers and Lines posted in Dynamic Ax originating from Sales Orders and Lines. CustPackingSlipJour  and  CustPackingSlipTrans  tables   contains   all sales  PackingSlip  headers and Lines posted in Dynamic Ax originating from Sales Orders and Lines. Cus...

Select Statement Syntax

Applies To:  Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012 SelectStatement = select Parameters Parameters [ [  FindOptions  ] [  FieldList  from ] ] TableBufferVariable [ IndexClause ] [  Options  ] [  WhereClause  ] [  JoinClause  ] FindOptions = crossCompany | reverse | firstFast | [ firstOnly | firstOnly10 | firstOnly100 | firstOnly1000 ] | forUpdate | noFetch | [forcePlaceholders | forceLiterals] | forceselectorder | forceNestedLoop | repeatableRead | validTimeState FieldList = Field  { ,  Field  } | * Field = Aggregate  (  FieldIdentifier  ) |  FieldIdentifier Aggregate = sum | avg | minof | maxof | count Options = [ order by , group by ,  FieldIdentifier  [ asc | desc ] { ,  FieldIdentifier  [...