Get Ledger Dimension Value in AX 2012

In Microsoft Dynamics AX 2009, an account number from the LedgerTable table was considered to represent a ledger account. The account number was combined with the financial dimensions array to link financial activity to a ledger account. An example of this was the LedgerTrans table, in which the AccountNum field represented the ledger account and the Dimension field represented the financial dimensions.

In Microsoft Dynamics AX 2012, these fields are deleted and replaced with a single field that holds the main account and all financial dimensions related to financial activity. Of course to get this value from this single field in AX 2012 are more complex than two fields which consist of main account id and array of financial dimension. Continue reading “Get Ledger Dimension Value in AX 2012”

Featured post

Customize : Restrict Session Date to Use Future Date AX 2012

Session date can help user to change the date for the current client session. The following list provides examples of some processes or areas of Microsoft Dynamics AX that are affected when you change the client session date:

  • The posting date in all modules
  • The invoice date and associated due date
  • The statistics period in which the current transaction is updated

Continue reading “Customize : Restrict Session Date to Use Future Date AX 2012”

Featured post

Select On-hand Per Date In AX 2012 Using SQL Query

If you know database structure in AX 2012, you can directly select data from SQL Server. Of course select data from SQL Server are faster than select data from AX 2012 framework.

In AX 2012, you can run report inventory to get On-hand data. To access it,  use this navigation : Inventory management -> Reports -> Physical inventory -> Physical inventory by inventory dimension. Use parameter below to run report :

onhand_axpar Continue reading “Select On-hand Per Date In AX 2012 Using SQL Query”

Featured post

str2Date Function in AX

This function is used to convert the specified string to a date value. There is 2 parameters in this function :

  1. _text : The string to convert to a date value.
  2. _sequence : A three digit integer that describes the positions of the day, month, and year in the string to convert (day = 1, month = 2, year = 3). For example, if we want to use year, month, day, we must write 321.

Continue reading “str2Date Function in AX”

Featured post

Select Latest On-hand In AX 2012 Using SQL Query

Like post in Select On-hand Per Date In AX 2012 Using SQL Query, i will share how to get latest on-hand in AX 2012 using SQL query. And this is the query :

use [AXDEV];
declare @DataAreaID varchar(10) = 'wip'
declare @ItemId varchar(20) = 'AR01010001'
declare @Size varchar(20) = '200'
Select a.ITEMID, b.PRODUCTNAME, c.UNITID, d.ITEMGROUPID, e.INVENTSIZEID, e.INVENTCOLORID,
ISNULL(e.AVAILPHYSICAL,0) as AVAILPHYSICAL,
ISNULL(e.RESERVPHYSICAL,0) as RESERVPHYSICAL,
ISNULL(e.AVAILPHYSICAL,0) - ISNULL(e.RESERVPHYSICAL,0) as TOTALAVAILABLE
from INVENTTABLE as a
left join ECORESPRODUCTTRANSLATIONS b on a.PRODUCT = b.PRODUCT
left join INVENTTABLEMODULE c on a.ITEMID = c.ITEMID and c.MODULETYPE = 0
left join INVENTITEMGROUPITEM d on a.ITEMID = d.ITEMID and a.DATAAREAID = d.ITEMDATAAREAID
inner join
(
select iSum.ITEMID, iDim.INVENTSIZEID, iDim.INVENTCOLORID,
sum(iSum.AVAILPHYSICAL) as AVAILPHYSICAL,
sum(iSum.RESERVPHYSICAL) as RESERVPHYSICAL
from INVENTSUM as iSum
inner join INVENTDIM as iDim on iDim.INVENTDIMID = iSum.INVENTDIMID
where iSum.DATAAREAID = @DataAreaID and iDim.DATAAREAID = @DataAreaID
group by iSum.ITEMID, iDim.INVENTSIZEID, iDim.INVENTCOLORID
) as e on e.ITEMID = a.ITEMID
where a.DATAAREAID = @DataAreaID and c.DATAAREAID = @DataAreaID
and e.AVAILPHYSICAL <> 0
/*and a.ITEMID = @ItemId and e.INVENTSIZEID = @Size*/
order by a.ITEMID, e.INVENTSIZEID, e.INVENTCOLORID

If you execute query above in Microsoft SQL Server Manajement Studio (MSSMS), you will see result like a picture below.

Result of query running

How To Create New User In AX 2012

Firsly, if the user doesn’t exist in domain, you must create a new user in active directory.

  1. Open Active Directory Users and ComputersAD
  2. Click on User, you can view all of listed users
  3. You can create with copy from users list with right click on one of user and select copy.
  4. You can also create with right click on User, then select New -> User.AD2
  5. Setting whatever you want, name, alias, etc then click next.AD3
  6. Setting your password and then click next.

 

How to Rearm 120 Days Grace Period Remote Desktop License Windows Server 2012

To rearm your remote desktop license, follow step below :

  1. Get file from here : https://docs.microsoft.com/en-us/sysinternals/downloads/psexec & unzip in path.
  2. Open command prompt with Run as administrator.
  3. Run this : psexec -i -d -s c:\windows\regedit.exe in command prompt to open regedit.
  4. Delete the REG_BINARY in:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
  5. Restart your windows server.

How To Restrict User To Access Remote Desktop Access On Windows Server

To deny a user or a group logon via RDP, explicitly set the “Deny logon through Remote Desktop Services” privilege. To do this access a group policy editor (either local to the server or from a OU) and set this privilege:

  1. Start | Run | Gpedit.msc if editing the local policy or chose the appropriate policy and edit it.
  2. Computer Configuration | Windows Settings | Security Settings | Local Policies | User Rights Assignment.
  3. Find and double click “Deny logon through Remote Desktop Services
  4. Add the user and / or the group that you would like to deny access.
  5. Click Ok.
  6. Either run gpupdate /force /target:computer or wait for the next policy refresh for this setting to take effect.

Create a website or blog at WordPress.com

Up ↑