Posts

Showing posts from 2017

Working time has not been specified for xx/xx/xxxx

Image
Hi Folks,
While trying to release a Production order, I encountered an error, Error: Working time has not been specified for xx/xx/xxxx when releasing production order Solution: You need to define the working time for working time calendar. Follow below steps.

Step I: Go to Organisation administration > Setup> Calendar > Calendars




Step II: Select a calendar and click on Working time on action pan.

Step III: Click on compose working time, and select appropriate values

Step IV: Once done, click on OK button, you will get default working time created for the calendar.

Enjoy…!!!
Harry


Microsoft Dynamics 365 for Finance and operations CookBook

Image
Hi Friends,
It gives me an immense pleasure to share this your all, my another book has been released today on "Microsoft Dynamics 365 for Finance and operations" aka 'AX7'
Update (20/09/2017): Recent review by Ali Raza Zaidihere.

Go and get your copy today...
Amazon | Packtpub | Kabo


Thanks for all your support. Enjoy….
Harry.





One more year with MVP Award, Thank you!!!~

Image
Hi Folks,
Its Party time!!!

But, First thing first. A big thanks to all of you, for your faith, support during previous year.  It’s really a great feeling to get connect with you guys.



It’s just a coincident, today I reach to my 250th and I think it’s a perfect post to say thank and share this party with all of you.



Keep sharing you feedback and queries, Enjoy…
Deepak Agarwal aka Harry

Related Post: 1st  Award 2nd Award 3rd Award
4th Award

Important links for Dynamics 365

Image
Hi Folks,
Here are some important links that you check for your routine work, update, RnD, submit a suggestion and many more. 
1. Microsoft Dynamics 365 Roadmap 2. Suggest a new Idea/Suggestion 3. Help and Training 4. Microsoft Dynamics 365 Documentation
Enjoy…. Harry PS: Photo taken from MS site.

How to use Form event ‘OnInitialized’ in Dynaics365

Image
Hi Folk,
In Dynamics365 there are many standard events on Forms, similarly like standard methods on different node of form. Let’s see how we can use ‘OnInitialized’ event on Form Data source and use form object into a different call.

Scenario: On from ‘ProjAdjustmentSplit’ I want to enable/disable a field on certain condition. As D365 urge to not to customize ant standard object than write EventHandlers to achieve your requirement. In earlier version of AX, we simple write this logic either on Form Active method or from DS init method. Here we have to use EventHandlder for the same.  Here we will use ‘OnInitialized’ method and will write an eventHandler for the same.

Let’s take a look.
Approach: Follow below step to get this done,
Step 1: Right click on “OnInitialized’ method and select ‘Copy event handler method’



Step 2: Create a new class and paste this method. /// <summary>
///
     /// </summary>
     /// <param name="sender"></param>
     /// <param …

X++ code for Product image upload in AX

Hi Folks, In my previous post I shared test code to upload bulk images in AX through X++ code. Here is another set of code to achieve the same. Create a new class with below methods. class ImageImport extends RunBase { // Packed variables FilePath filePath; NoYesId setDefault; ItemIdEANExternalItemIdRadio itemIdEANExternalItemIdRadio; VendAccount vendAccount; // Dialog fields DialogField dlgfilePath; DialogField dlgsetDefault; DialogField dlgitemIdEANExternalItemIdRadio; DialogField dlgVendAccount; #define.CurrentVersion(1) #define.Version1(1) #localmacro.CurrentList filePath ,setDefault ,DMItemIdEANExternalItemIdRadio ,vendAccount #endmacro } public Object dialog() { DialogRunbase dialog = super(); dlgfilePath = dialog.addFieldValue(extendedTypeStr(FilePath),filePath); …

How to enable ARM for D365 deployment

Hi Folks,
Many of us trying to deploy the new D365 environment using LCS and Azure, but due to ARM configuration we face below issue, 




Issue: Lifecycle Services can't connect to the Azure subscription using Azure Resource Manager. Click the Microsoft Azure Settings button and edit the selected Connector to provide the required permissions to ERP applications in your Azure subscription. If the issue persists, please contact support with this Id: da1c591d-7360-413c-b370-b51ec1ddef2b
Here are some good links on how we can fix this issue once for all, 
1. https://blogs.msdn.microsoft.com/axsupport/2016/11/09/deal-with-dynamics-deployment-services-wsfed-enabled/ 2. https://docs.microsoft.com/en-us/dynamics365/operations/dev-itpro/deployment/arm-onboarding 3. https://community.dynamics.com/ax/f/33/t/209278
Hope this will help. Thanks Harry

Breakpoint not hit in Visual studio [Dynamics 365]

Image
Hi Folks,




Situation: While put a breakpoint and try to hit debug on any object which is not a part of your solution/project; Breakpoint will not hit. You will get below message.
“The breakpoint will not currently be hit. No symbols have been loaded for this document.”


Possible reason: This is because of one of Debugger property that will not load any symbols for other than Solution/Project objects. Solution: To enable such debugging, you have to set the debugger property, Uncheck this option Load symbols only for items in the solution as shown below snaps,
Step 1: Go to Dynamics 365 menu in Visual studio and select option


Step 2: Choose Debugging option from list and uncheck the Load symbols only for items in the solution


Now try to run again, this time breakpoint should hit as expected.
Enjoy…!!!
Harry

Send Message to all Online users [Dynamics 365 FO]

Image
Hi Guys,
In D365 where we manage most of the things using LCS, if there is any Planned/Unplanned activity need to perform on server and down time require. In such case, you need to send a message to all online used for that particular environment. To do that simply follow below steps,
Step 1:Login into your LCS account. 
Step 2: Under Environment section > select your environment. > Click on maintain option > Select Message online users.

Step 3: Here you will have two options i.Broadcast a new message for downtime: Post a new message ii.Cancel message: To cancel any previous posted message.

Step 4: Select Broadcast a new message for downtime, you have to provide message start date time and when this operation will begin OR massage valid to date time. click on Post button and click when asking for confirmation.

Step 5: When a user will login into environment he/she must get this message

Merger two LedgerDimension in Dynamics 365

Hi Folks,
In myprevious postI shared  information about newclassed that introduced in D365 for Dimension actions. In this post, I am sharing a sample code to merge two different ledger dimension and get a new LedgerDimension id. This is rough code, please feel free to copy and update it according to your requirement.
public static void main(Args _args)    {            LedgerJournalTrans  ledgerJournalTrans1, ledgerJournalTrans2 ;        RefRecId            dim1, dim2, mergerDim;        select firstonly TrvExpTrans where TrvExpTrans.ExpNumber == "USMF-000565";        select firstonly AccountingDistribution where AccountingDistribution.SourceDocumentLine == SourceDocumentLine::find(TrvExpTrans.SourceDocumentLine).RecId;        //AccountingDistribution::        dim1 = TrvCostType::find("mycategory").LedgerDimension; //First dimension        dim2 = 5637236123;//AccountingDistribution.LedgerDimension; //Second dimension        mergerDim = LedgerDimensionFacade::serviceMergeLedgerDi…

New classes in Dynamics 365 for Dimensions

Image
Hi Folks,
Since many days, I was trying to perform few logics over LedgerDimensions and DefaultDimensions, like merge and replace etc. In AX2012 its handled by DiemsionDefaultingService class that having many static method to help us to play around ledger/default dimensions.
But in Dynamics 365 FO , this class is deprecated, and MS introduce few more classes to help us with these requirements. Here are few name of classes and method that can be used.

1. LedgerDimensionFacade : This class used for fixed LedgerDimension, we have many static methods here, like Merge Dimension, getdefaultDimension and many more, refer below image.


2. LedgerDimensionDefaultFacade: This class will help us to perform action over default dimension. Like Merge specify default dimension into single default dimension, replace attribute value etc.
Please refer below image, 


Both classed having almost same method that is available in AX with DiemsionDefaultingService class.


See Also,

How to merge two dimension
-Harry

How to setup Item coverage in Dynamics 365 FO

Image
While performing some inventory transaction or MRP you may get this error “Item coverage is not fully updated.". We encounter this error because of default item coverage is not available for selected item and inventory dimension. Here is step by step guide to setup the item coverage for various inventory dimension.
Go to Master planning > Setup > Item coverage and Follow below steps to setup Item coverage.
Please note: few steps may differ on the basis of your selection during the wizard.











Enjoy…!!!
Harry












How to rename an Object in VisualStudio[Dynamics365/AX7]

Image
Hi Folks,
Many times we need to duplicate an standard object and do the required changes and system gives warning while rename. Same caused error during project build.
Problem: While renaming any object in Visual studio project system throw below warning
“Some of the files you are renaming or moving will be located outside of the project's binding root. The item(s) <objectName>.xml will not be source controlled if you continue with this rename.”

If you just continue with change , you may get errors while project/solution build.
Possible reason: If you are using TFS and this new object are not added to source code you’' will get this error.
Suggest Solution: Add this new object in Source control by right click on object and select “Add file  to source control”

Now you should be able to rename it.
This works for me perfectly. If you got some other solution to fix this issue plz keep share your feedback or links to other posts.
-Harry

How to add Standard Address fields into a new table [Dynamics365/AX7]

Image
Hi Folks,

Its been a long time to write any new post on AX. Here I’m back today. Since few months we all are trying the new Dynamics 365 and its amazing new features in D365.

In this post we will see how to add new address fields in table using Table mapping.

[Note: In D365 we have object extension functionality to customize standard objects. But we don't have this option for Maps. This post will also help you to understand the alternative for the same by using table Mapping section.]

Requirement: We need to add all standard address fields in table followed by adding a new tab for address in respective from.

Proposed solution: We can achieve this by adding a single field rather than add multiple fields in table. Perform below steps to get this done,

1. Add a new field in table, EDT type “LogisticsLocationRecId”, rename it  as “Location”.

2. Now add a new Foreign key relation for “LogisticPostalAddress”  table and set its property as below snap shot,



3. Add a new map in mapping …

Item Image upload through X++ code

static void TheAxapta_ItemImageUpload(Args _args)
{
    DocuActionArchive               docuActionArchive;
    EcoResProductImageManagement    productImageManagement;
    EcoResProductImageThumbnail     ecoResProductImageThumbnail;
    DocuRef     docuRef;
    DocuValue   docuValue, dv;
    EcoResProductImage  ecoResProductImage;
    EcoResProduct       ecoResProduct;
    InventTable         inventTable;
    Name                imageName  ;
    int                 voucherCounter;
    FilePath               _folderPath;

    System.String[] fileNames;
    int fileCount, i, insertCount;
    str fileName, trimmedFileName, fileNameWithExt;
    BinData binData;
    binData = new BinData();
    //_folderPath = "C:\\Migration\\Products\\DefaultOrderSettings\\";
    fileNames = System.IO.Directory::GetFiles(@"c:\\itemimages\\");
    fileCount = fileNames.get_Length();
    select count(RecId) from dv;
    voucherCounter = any2int(dv.RecId) + 1;
     //clean the product imag…