Pages

October 02, 2016

How to deploy a Package [AX7]

Hi Folks,

[Make sure you will run every application as admin]

I hope many of us already moved on Next version of Dynamics AX. Today I am going to demonstrate “How to Deploy a Package in AX7”. In current version, we have new architecture for code deployment. Now we don’t have the option for ad hoc import, like we did using XPO export import. Now AX is very different in terms of deployment, code movement and build etc, Please refer this post for more details this architecture.
Every customization must be moved using deployable package from one environment to another. There two ways to move this package on target environment.

Check below link for meta data hotfix,
How deploy a metadata or X++ hotfix [D365FO]


A. Using LCS services.
B. Manual using command prompt.

Here I’ll show using command prompt, as I found its better than LCS (After successfully deploy many packages J)
Follow below steps,
clip_image002

1. Create Deployment Package:
Run VS as admin, Go to Dynamics AX menu. Select Create a deployment package as shown below.

clip_image003

Choose your package from list and path to save this file
image

Click on create.
It will take few minutes to complete this process.

2. Upload on LCS shared library:
However, we are not using LCS in this demo, but it’s always a good practice to maintain all deployment package on LCS. You can use this library to deploy this package to any environment that is part of your project.
Upload this file to LCS, shared asset library> S/w deployable package

clip_image007

Click on + button, Fill the details, select the package

clip_image008

Add file and, upload the same.

clip_image009

After upload done, click on confirm.

3. Open Other environment (RDP).

4. Copy this package to this box (Download this package from LCS there. OR copy paste there).

5. Now, first right click on zip file, unlock this. Expend it.

Now run this command for all child folders, unlock this zip file using PowerShell command
Get-ChildItem C:\Users\axlocaladmin\Downloads\ AXDeployablePackage_20160923_05_36_14-recurse | Unblock-File –Confirm

clip_image011

6. Generate runbook for this package.
    a. Open command prompt as administrator
    b. Navigate to your package folder
    c. Run below command
On any VM, run the following command to generate the runbook.
AXUpdateInstaller.exe generate –runbookid=[runbookID] –topologyfile=[topologyFile] –servicemodelfile=[serviceModelFile] –runbookfile=[runbookFile]
Here is an explanation of the parameters that are used in this command:
      i. [runbookID] – A parameter that is specified by the developer who applies the deployable package
      ii. [topologyFile] – The path of the DefaultTopologyData.xml file
      iii. [serviceModelFile] – The path of the DefaultServiceModelData.xml file
      iv. [runbookFile] – The name of the runbook file to generate (for example, AOSRunbook.xml)

Example
AXUpdateInstaller.exe generate -runbookid=" AXDeployablePackage_20160923_05_36_14-runbook" -topologyfile="DefaultTopologyData.xml" -servicemodelfile="DefaultServiceModelData.xml" -runbookfile=" AXDeployablePackage_20160923_05_36_14-runbook.xml"
The runbook provides the sequence of steps that must be run to update the environment. The following illustration shows an example of a runbook file. Each step in a runbook is associated with an ID, a machine name, and step execution details.
Sometimes runbook id will not generated correctly, so you have to manually update the same in runbook file. Simply copy your folder name and out it as runbook id in xml file.

clip_image013
This process will generate a runbook xml file into package folder.

7. Import the runbook by running the following command.
AXUpdateInstaller.exe import -runbookfile=[runbookFile]

Example
AXUpdateInstaller.exe import -runbookfile=" AXDeployablePackage_20160923_05_36_14-runbook.xml"
clip_image015

8. Verify the runbook.
AXUpdateInstaller.exe list
clip_image017
  1. Execute the runbook.
AXUpdateInstaller.exe execute -runbookid=[runbookID]
Example
AXUpdateInstaller.exe execute -runbookid=" AXDeployablePackage_20160923_05_36_14-runbook"
  1. Export the runbook.
AXUpdateInstaller.exe export -runbookid=[runbookID] -runbookfile=[runbookFile]

Example
AXUpdateInstaller.exe export -runbookid="VAL200AA2BMEDIU-runbook" -runbookfile="VAL200AA2BMEDIU-runbook.xml"
AXUpdateInstaller updates the runbook file after each step is run on a VM. The runbook also logs information about each step.
clip_image019


Troubleshooting:

1. Sometimes you will get some issue on execution, so it’s better to rename the package folder and use old name in runbook.
For eg: If your package file name is like “AXDeployablePackage_20160923_05_36_14” Than you have to rename this folder as “AXDeployablePackage”. Now unlock this folder using PowerShell and try with further steps.

2. For more detail check below links.
https://ax.help.dynamics.com/en/wiki/installing-deployable-package-in-ax7/

-Harry

October 01, 2016

Fourth time in a row

Hi All, 

After a hattrick, it’s my fourth time in a row.  Thanks to each of you for your and support.   


Old Post:

-Deepak Agarwal aka Harry 


Follow us on Facebook to keep in rhythm with us. @Facebook https://www.facebook.com/theaxapta

September 15, 2016

Menu buttons are not appearing on Dynamics AX application

Hi Folks,

When you access AX application on DEV/TEST/SAND box (server directly) you will miss several menu/option buttons.

clip_image001

clip_image002

clip_image004

Same issue is with LCS portal.

clip_image005

clip_image007

To fix this issue, just add both URL as trusted site. To do this follow below easy steps:

1. Open Internet explorer

2. Go to Option->Security->trusted site and add both there

clip_image008

clip_image010clip_image011

Now open refresh your pages and check….

clip_image013

clip_image014

Now it look more catchy , isn’t it.

September 12, 2016

Setup Number Sequence in AX7

Hi Friends,

Number sequence setup is almost same in D365 and AX2012. We have to Setup number sequence for first time use our environment. Follow below few steps are you all set to go.

1. Go to

clip_image002

2. Click on generate
clip_image003

New wizard will open,
clip_image005

Click on next button,
clip_image007


clip_image009
That’s all. You all set with number sequence now.

-Harry

August 31, 2016

Recurring Data import/Export in AX7

Hi Folks,

Since we have AX7 in market now and many of us already started on this excited version. There are many new things coming in and some are deprecated as well. 

I was facing a requirement on DIXF in AX7 where I need to import a file from a shared path. As AX7 is on Azure now and every export/import will be using blob. So here issues come, how we can use our shared path to import/Export the files. However, I didn’t found any straight forward method for dequeue (export), but successfully done with enqueue(Import).

You can refer below link for more details and download API to support your customization. 




If you check the README file in DIXF sample, where they mention some compatibility issue with CTP8 version, so EXCEL will not have supported there, you may face version issue 

"The version of Microsoft Excel is not supported. -Exception from HRESULT: 0xC020801C"

There is one blog also which can help you somehow but again ODBC is not supported in AX7 because of Azure/cloud thing. 

So what I did here is, I used an XML file to import and it worked for me. It will pick XML file from your defined path and push file into your AX recurring job. All you need to do after getting all parameter for this API, insert your data into an XML file and use this, it should work.

Soon I will post a blog on this API, how to use this with more details on prerequisite.

You can post your question in comment, I would be happy to discuss.

Thanks to my friend Sharran sundar Balasubramaniam who helped me a lot on .net part.

-Harry Follow us on Facebook to keep in rhythm with us. @Facebook https://www.facebook.com/theaxapta

June 01, 2016

Extensible Data Security Framework in MS Dynamics AX 7

This feature replaces the record level security feature available in earlier releases of AX. The extensible data security framework or XDS policy framework enables developers and administrators to secure data in shared tables such that users have access to only the part of the table that is allowed by the enforced policy.
Features:
1. Improved filters for data security
2. Data security based on effective date
3. Data security policy concept

Concept:
1. Constrained table
2. Primary table
3. Policy query
4. Context

Process:
Step 1: Create a query
Step 2: Create a policy
Step 3: Add constrained table or view
Step 4: Configure the context

This post referred from here


-Harry Follow us on Facebook to keep in rhythm with us. @Facebook

April 18, 2016

ITI Windows 10 Roadshow - April 23, 2016 (Noida)

Hi Folks

IT Implementer Community Roadshow -  Windows 10
Discover the most innovative and reliable Windows yet!

Windows 10 brings increased stability and predictability to your
organization, while minimizing risk. Attend this session on What's new
in Windows 10 Enterprise: Increasing Security, Predictability, and
Compatibility to explore new servicing, security, and management
features that enable corporate data access across devices and platforms
while allowing you to maintain control over those devices. 
Join us to explore:

* What's new in Windows 10.
* How to help ensure application compatibility with new and
legacy LOB apps with Microsoft Edge and IE 11.
*  How to implement security and identity capabilities through
Microsoft Azure Active Directory, Hello/Passport, Device Guard,
Enterprise Data Protection, as well as Multi-Factor Authentication.
* Windows as a Service.
How to create and configure deployment and management packages using
Microsoft Mobile Device Management, and Microsoft Intune.


Venue:
The Park Plaza Noida C-Block, Sector 55, Noida, UP 201307, India
Phone: +91 120 4678888

Register here:
https://www.microsoftevents.com/profile/form/index.cfm?PKformID=0x1847387d9d


-Harry

Follow us on Facebook to keep in rhythm with us. @Facebook

April 07, 2016

Hide ENUM values at run time [AX-2012]

Hi Folks,
Here is code sample to hide ENUM elements from a FORM at run time.  For reference purpose I’m using SalesTable.BankducmentType (ENUM = BankDocumentType) field which contain below four elements
1. None
2. LetterOfCredit
3. ImportCollection
4. LetterOfGuarantee
image
Now i want to show only first two values while selecting on SO, to achieve this override the form control method as below

public void enter()
{
    super();
    this.delete(enum2str(BankDocumentType::LetterOfGuarantee));
    this.delete(enum2str(BankDocumentType::ImportCollection));   
}


Save your changes and, Now run your form and you will get desired values only.
image

-Harry

April 04, 2016

Alex on DAX (Alex Kwitny): How to find what projects an object from the AOT e...

Alex on DAX (Alex Kwitny): How to find what projects an object from the AOT e...: Where I work, we are required to create a new, numbered project for every modification request.  The numbered projects have corresponding do... -Harry Follow us on Facebook to keep in rhythm with us. @Facebookhttps://www.facebook.com/theaxapta

March 14, 2016

Dynamics 365/AX7 available certification

Updated: May 6, 2017.

Hi Folks,

Here is some information regarding latest version of AX certification.

Exam titleExam number
Microsoft Dynamics 365 customer engagement Online DeploymentMB2-715
Microsoft Dynamics 365 Customization and ConfigurationMB2-716
Microsoft Dynamics 365 for SalesMB2-717
Microsoft Dynamics 365 for Customer ServiceMB2-718


Refer these link also,

https://www.microsoft.com/en-us/learning/mcsa-microsoft-dynamics-365.aspx
https://www.microsoft.com/en-us/learning/dynamics-certification.aspx


-Harry
 Follow us on Facebook to keep in rhythm with us. @Facebook https://www.facebook.com/theaxapta

March 11, 2016

Dynamics Ax 7, RTW is here

Hi Folks,

Finally we have a RTW(Release to Web) version of new Dynamics AX 7 (build number 7.0.1265.3015) and has been made available for deployments now. you can download virtual machine (VM) with below link

Dynamics Ax 7

(make sure you have require access for this link).

You can also get a lot of reference material + VM on LCS portal (Lifecycle services). LCS will also help you to deploy your desired environment on cloud.

Follow below link to get detailed information,  how to access Microsoft Dynamics AX Development instances, configure on premise development VMs, and find key configurations settings for developers and administrators.
Access Microsoft Dynamics AX Development Instances

That's all for now.

Enjoy….
Harry

March 10, 2016

Welcome To TechBrothersIT: Microsoft Dynamics Lifecycle Services Video Tutori...

Welcome To TechBrothersIT: Microsoft Dynamics Lifecycle Services Video Tutori...: This playlist is dedicated to Microsoft Dynamics Lifecycle Services also known as LCS. This playlist contains videos from overview to detai...

 -Harry Follow us on Facebook to keep in rhythm with us. @Facebookhttps://www.facebook.com/theaxapta

March 03, 2016

FormButtonGroupControl object does not have method “realValue”

 

Hi Guys,

While accessing realEdit control methods in code system gives below error runtime.

Error:

image

Possible solution:

Although there are not such issue with your code. Its just cache issue. Try to clear cache and compile your whole project.

This issue must be fixed now.

Thanks-

Harry

February 26, 2016

Error with Main account lookup: FormDataObject object does not have method 'resolveReference'

Hi Folks,

Recently I faced one issue with Main account lookup on a new table. While selecting value from lookup I am getting several different errors, (see snaps below).

Error message:

Error executing code: FormDataObject object does not have method 'resolveReference'.

Stack trace

(C)\Classes\FormDataObject\resolveReference
(C)\Classes\FormSegmentedEntryControl\resolveReference
(C)\Classes\FormSegmentedEntryControl\modified
(C)\Classes\FormSegmentedEntryControl\Leave
(C)\Classes\FormRun\task
(C)\Classes\SysSetupFormRun\task - line 20

Error Snaps:

clip_image001

clip_image002

clip_image003

Solution:

Try below steps to resolve this issue.

1. Create a normal relation in your table with DimensionAttributeValueCombination table like below

yourTable.LedgerDimension == DimensionAttributeValueCombination.RecId

2. On Form Data source, overwrite below method on LedgerDImension field

public Common resolveReference(FormReferenceControl _formReferenceControl)
{
    return revaluationAccountController.resolveReference();
}

3. Overwrite below methods on Design object control

clip_image004

Make sure you well defined your variable in class declaration and initiate them in form init method.

4. Compile your Form and insert a record.

Let me know if you need complete code for the same, I’ll share.

Thanks

Harry.