Popular Posts
- Introduction & String Functions in AX 2012
- Convert Functions in ax 2012
- X++ code for Import data from excel using all datatypes in ax 2012
- (no title)
- Date functions in ax 2012
- X++ Code to create Lookup for DialogField in ax 2012 r3
- AX Versions and Overview of Microsoft Dynamics AX build numbers
- X++ code to Export data to Excel sheet in ax 2012
- X++ code for Modify dialog fields in ax 2012
- X++ Code for Creating New Customer and also update Address of the customer
Wednesday, October 11, 2017
Wednesday, August 23, 2017
X++ code to find current legal entity Country region
static void
FindCountryregionforLegalentity(Args _args)
{
CompanyInfo company;
#ISOCountryRegionCodes
boolean isIsoUS =
SysCountryRegionCode::isLegalEntityInCountryRegion([#isoUS]);
if(isIsoUS == true)
{
info("US");
}
}
Friday, June 30, 2017
X++ code to Set Default dimension based on Dimension attribute and finanacial dimension Display Value in AX 2012
X++ code to Set Default dimension based on Dimension attribute and finanacial dimension Display Value in AX 2012
Note:
1)Here DimensionDefault is financial dimension combination( i.e recid),
2)Name is Like Dimension attribute name(ex Department).
3)_dimvalue is Displayvalue
public static
DimensionDefault setDefaultDimension(DimensionDefault defaultDimension, Name
_dimensionAttributeName, str _dimValue)
{
DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttr;
DimensionAttributeValueSetStorage dimAttrValueSetStorage;
dimAttrValueSetStorage =
DimensionAttributeValueSetStorage::find(defaultDimension);
dimAttr = DimensionAttribute::findByName(_dimensionAttributeName);
dimAttrValue =
DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttr, _dimValue, false, true);
if(dimAttrValue)
{
dimAttrValueSetStorage.addItem(dimAttrValue);
return
dimAttrValueSetStorage.save();
}
return
defaultDimension;
}
Keep Daxing :)
x++ code to find Financial dimension Display value for based on default dimension with respective Dimension attribute in ax 2012
Hi Reader's,
lets learn small tip to show up display value based on default dimension with respective Dimension attribute in ax 2012
Note:
1)Here DimensionDefault is financial dimension combination( i.e recid),
2)Name is Like Dimension attribute name(ex Department).
public static
DimensionValue getDimensionValue(DimensionDefault _dimensionDefault, Name
_dimensionAttributeName)
{
DimensionAttribute attribute;
DimensionAttributeValueSetItemView
valueSetItemView;
attribute
= DimensionAttribute::findByName(_dimensionAttributeName);
select
DisplayValue from valueSetItemView
where
valueSetItemView.DimensionAttributeValueSet == _dimensionDefault
&&
valueSetItemView.DimensionAttribute == attribute.RecId;
return
valueSetItemView.DisplayValue;
}
Keep Daxing !!!
Friday, June 23, 2017
Tables hit while creating Service orders up to invoice posting in ax 2012
Tables hit while creating Service orders up to invoice posting in ax 2012
The flow data will be as follows.
SMAServiceOrderTable >> SMAServiceOrderLine>> InventJournalTrans>> ProjItemTrans>> ProjProposalItem>> ProjInvoiceItem>> ProjProposalItemDetail>> ProjItemTransSale
SMAServiceOrderTable:
The SMAServiceOrderTable table contains service orders. The service orders can
be linked to agreements or be stand-alone orders that are linked to projects.
SMAServiceOrderLine:
The SMAServiceOrderLine table contains service order lines that specify the
detailed work, items, fees, and expenses of an individual service order.
InventJournalTrans
: The InventJournalTrans table contains information about items and
represents a line in an inventory journal. Each record has information related
to a specific item and is related to a record in the InventJournalTable table,
which is the journal header.
ProjItemTrans:
The ProjItemTrans table is used to store posted item transactions of
projects. Posting an item journal will
create records on this table.(i.e Posted service orders).
ProjProposalItem
:The ProjProposalItem table stores project invoice proposal lines of the item
transaction type. The ProjProposalItem
records are the item transactions that will be billed to the customer when the
invoice proposal is posted.
ProjInvoiceItem
:The ProjInvoiceItem table stores posted project invoice lines of the item
transaction type. Posting an invoice
proposal with item transactions will create records in the ProjInvoiceItem
table.
ProjProposalItemDetail
:The ProjProposalItemDetail table stores the project invoice proposal lines of
item transactions. These records are the item transactions that will be billed
to the customer when the invoice proposal is posted.
ProjItemTransSale:The
ProjItemTransSale table contains project item sale transactions.
Keep Daxing !!!
Thursday, June 22, 2017
X++ code for Look up to filter only Global Addresses with respect to Purpose :: Like Delivery Addresses.
Hi Folk's
Recently,I was gone through with an weird requirement to filter the Global Addresses with respect to Purpose :: Like Delivery Addresses.
Note : Here the form control is Reference group.
Keep Daxing !!!
Recently,I was gone through with an weird requirement to filter the Global Addresses with respect to Purpose :: Like Delivery Addresses.
Note : Here the form control is Reference group.
public Common
lookupReference(FormReferenceControl _formReferenceControl)
{
Query query;
QueryBuildDataSource qbds,qbds1,qbds2,qbds3;
QueryBuildRange qbr;
SysReferenceTableLookup
sysRefTableLookup;
LogisticsPostalAddress logisticsPostalAddress;
sysRefTableLookup =
SysReferenceTableLookup::newParameters(tableNum(LogisticsPostalAddress),_formReferenceControl,true);
sysRefTableLookup.addLookupfield(fieldNum(logisticsPostalAddress,Address));
sysRefTableLookup.addLookupMethod(tableMethodStr(logisticsPostalAddress,displayLocationDescription));
query = new Query();
qbds
= query.addDataSource(tableNum(LogisticsPostalAddress));
qbds1 = qbds.addDataSource(tableNum(DirPartyLocation));
qbds1.joinMode(JoinMode::ExistsJoin);
qbds1.relations(true);
qbds1.addLink(fieldnum(DirPartyLocation,location),fieldNum(LogisticsPostalAddress,location));
qbds2 = qbds1.addDataSource(tableNum(DirPartyLocationRole));
qbds2.joinMode(JoinMode::ExistsJoin);
qbds2.relations(true);
qbds3 = qbds2.addDataSource(tableNum(LogisticsLocationRole));
qbds3.joinMode(JoinMode::ExistsJoin);
qbds3.relations(true);
qbr = qbds3.addRange(fieldNum(LogisticsLocationRole,Type));
qbr.value(enum2str(LogisticsLocationRoleType::Delivery));
sysRefTableLookup.parmQuery(query);
logisticsPostalAddress = sysRefTableLookup.performFormLookup();
return
logisticsPostalAddress;
}
Monday, April 24, 2017
x++ code to disable filter in lookup code in Ax2012
Hi Folks,
After a long gap due to busy schedule..
Today,Lets learn small trick ,how to disable filter in lookup code in Ax2012
After a long gap due to busy schedule..
Today,Lets learn small trick ,how to disable filter in lookup code in Ax2012
public void
lookup(FormControl _formControl, str
_filterStr)
{
SysTableLookup sysTableLookup;
Query query;
QueryBuildDataSource qbds;
QueryBuildRange qbr;
//super(_formControl,
_filterStr);
sysTableLookup = SysTableLookup::newParameters(tableNum(InventTable),_formControl);
sysTableLookup.addLookupfield(fieldNum(InventTable,ItemId));
sysTableLookup.addLookupfield(fieldNum(InventTable,NameAlias));
sysTableLookup.addLookupfield(fieldNum(InventTable,ItemType));
query = new
Query();
qbds
= query.addDataSource(tableNum(InventTable));
qbr
= qbds.addRange(fieldNum(InventTable,ItemType));
qbr.value(enum2str(ItemType::Service));
qbr.status(RangeStatus::Hidden); //Itemtype Filter disable
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
Subscribe to:
Posts (Atom)
Export a copy of the standard user acceptance testing (UAT) database
Reference link: Export a copy of the standard user acceptance testing (UAT) database - Finance & Operations | Dynamics 365 | Microsoft ...
-
static void CON_PeriodicJournal_Multiplelines(Args _args) { LedgerJournalTrans ledgerJournalTrans,LedgerJournaltrans1; ...
-
X++ Code to cancel Sales order static void DMSSOCancel(Args _args) { SalesTable salestable; ...
-
Hi Daxer's !!! I'm very glad to explore my knowledge on Microsoft Dynamics Ax . -- " Gaining knowledge is the first s...