Showing posts with label Note to Self. Show all posts
Showing posts with label Note to Self. Show all posts

Tuesday, October 1, 2013

[AX 2012] Note to Self: Get Dimension Value of An Attribute

A sample code to get a value of an attribute dimension:

static void MyJob(Args _args)
{
  info(
    DimensionAttributeValueSetStorage::find(
      SalesLine::findRecId(1234567890).DefaultDimension)
        .getDisplayValueByDimensionAttribute(
          DimensionAttribute::findByName("AttributeName").RecId));
}

Monday, October 31, 2011

Note to Self: AX SSRS Default (Today) Value for Date Parameter

I find this useful as my copy and paste resource for my Dynamics AX Reporting Project development to create default (today) value for Date parameter:
=DateSerial(Year(NOW), Month(NOW), Day(NOW))

And the properties window snapshot:

Of course, other alternative is by using Datasets as following snapshot (taken from Cust ReportsLibrary):

Wednesday, February 24, 2010

Note to Self: Invoking Static Members of a Class in BRE

To invoke static members of a class, StaticSupport must be added in the registry:
  • For 32 bit, the location is in:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\BusinessRules\3.0\StaticSupport
  • For 64 bit, the location is in:
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\BusinessRules\3.0\StaticSupport

Saturday, November 21, 2009

Note to Self: Add to The Global Assembly Cache on MSI Imports

Lately, I've been busy with deployment and re-deployment of BizTalk solutions for testing purposes. In the deployment step, I just want to import the MSI and done. But, to do that, I also need to make sure that when I import the MSI, all the assemblies is also added to the GAC. So, I have to modify each of the resources and check the "Add to the global assembly cache on MSI imports (gacutil)" option. Well, it's quite annoying things to do if you need to do this for all the resources.

Thanks to Dmitriy, I just need to run this query in the adpl_sat table of BizTalkMgmtDb database:
update dbo.adpl_sat set properties = replace(cast(properties as nvarchar(4000)),
'UpdateGacOnImport</key><value>
False', 'UpdateGacOnImport</key><value>True') where applicationId = <app_id>