martedì 7 aprile 2015

HOWTO: Merge ledger and financial dimensions using X++ code

To merge two or more financial dimensions use this script.
DimensionDefaultingService::serviceCreateLedgerDimension(ledgerDimension,customerDefaultDimension);
You can merge more  than 2 dimension, infact you case specify some default dimensions to merge

ISSUE: Standard view is displayed as table in AOT on AX2012

Today I found a strange error in the development environment, do not know what was the triggering event but a standard view become visible under table node and the syncronization failed.

From research I found this post:
http://community.dynamics.com/ax/f/33/t/118864.aspx

and then another post with a more in-depth: http://community.dynamics.com /ax/f/33/p/119471/249240.aspx?WT.mc_id=ForumPost#249240

In my case I solved using a direct SQL patch way.

The solution is to restore the table properties on model database coping it from another standard model store or as in my case the production env database.

1. Stopped the dev AOS
2. Removed from the table SQLDictionary any object references
3. Removed from the database the view refers to object (check if there are a table also)
4. Check the object properties on the model database:

SELECT m.ElementType, m.Name, m.AxId, md.LayerId, manifest.DisplayName, md.Properties as Metadata
              FROM [dbo].ModelElement AS m
              INNER JOIN [dbo].ModelElementData AS md
                             ON m.ElementHandle = md.ElementHandle
              INNER JOIN [dbo].ModelManifest AS manifest
                             ON md.ModelId = manifest.ModelId
              AND m.ElementType = 44 AND m.Name = 'DirPartyLookupGridView'

5. Check the object properties on the other model database:

SELECT m.ElementType, m.Name, m.AxId, md.LayerId, manifest.DisplayName, md.Properties as Metadata
              FROM MicrosoftDynamicsAXBaseline.[dbo].ModelElement AS m
              INNER JOIN MicrosoftDynamicsAXBaseline.[dbo].ModelElementData AS md
                             ON m.ElementHandle = md.ElementHandle
              INNER JOIN MicrosoftDynamicsAXBaseline.[dbo].ModelManifest AS manifest
                             ON md.ModelId = manifest.ModelId
              AND m.ElementType = 44 AND m.Name = 'DirPartyLookupGridView'
6. Update the object properties coping it from the other model database:

Update md Set md.Properties = md_base.Properties
FROM [dbo].ModelElement AS m
              INNER JOIN [dbo].ModelElementData AS md
                             ON m.ElementHandle = md.ElementHandle
              INNER JOIN MicrosoftDynamicsAXBaseline.[dbo].ModelElement AS m_base
                             ON m.ElementType = m_base.ElementType AND m.Name = m_base.Name
              INNER JOIN MicrosoftDynamicsAXBaseline.[dbo].ModelElementData AS md_base
                             ON m_base.ElementHandle = md_base.ElementHandle
AND m_base.ElementType = 44 AND m_base.Name = 'DirPartyLookupGridView' AND md_base.LayerId = 0

WARNING: Use the script on your own risk and evalute the impact on you env and warranty

AX 2012: The request was aborted: Could not create SSL/TLS secure channel

The error you're encountering, "The request was aborted: Could not create SSL/TLS secure channel," can occur due to various re...