November 23, 2017

How to Delete a model in Dynamics 365 for FO


I was trying for this for very long time, on initial stage of development it was one of the biggest headache for me. HOW TO DELTE A MODEL. So now finally I come to conclusion on this.

Note: I would recommend check with all other developer who is sharing the same dev machine before deleting this to make nothing will go wrong. Take a backup of your code.

Prerequisite:
1.     Login to server using admin credentials
2.     Check your model directory it must be sore under below path/folder
C:\AOSService\PackagesLocalDirectory/<your model>





There can be two scenarios here,
1.     Model belongs to its own package
2.     Model belongs to standard (existing) package.

1.     If your model belongs to its own package (For example: An extension package with no other models in the package):
a.      Stop the following services: The AOS web service and the Batch Management Service
b.     Delete the package folder C:\AOSService\PackagesLocalDirectory\<your model>
c.      Restart the services from step 1
d.     If Visual Studio is running, refresh your models (Visual Studio > Dynamics 365 > Model management > Refresh models)
e.      In Visual Studio, perform a full database synchronization (Visual Studio > Dynamics 365 > Synchronize database...)





2.     If your model belongs to a package with multiple models (For example, <your model> overlays Application Suite):
a.      Stop the following services: The AOS web service and the Batch Management Service
b.     Delete the model folder C:\AOSService\PackagesLocalDirectory<PackageName>\<your model> (In this example PackageName=ApplicationSuite)
c.      Restart the services from step 1
d.     In Visual Studio, refresh your models (Visual Studio > Dynamics 365 > Model management > Refresh models)
e.      In Visual Studio, build the package that the deleted models belonged to (Visual Studio > Dynamics 365 > Build models...)
f.       In Visual Studio, perform a full database synchronization (Visual Studio > Dynamics 365 > Synchronize database...)


Enjoy..
Harry.

Disc: This post is referred from here.


November 11, 2017

Mobile app development in D365 for FO - Part I

Hi Folks,


This is my first post on mobile development, here I am going to share basic development steps (that’s doesn’t require any coding really.) J MS released a new mobile app for Android and iOS named as “Microsoft Dynamics 365 Unified Operations”, MS keep releasing new exciting feature and support in a timely manner.

1.      Download Microsoft Dynamics 365 Unified Operation app from your mobile store



2.      For the first time, you need to use your D365 application URL and valid credentials to open this app



3.      Now go to your web browser and open D365. On the right top corner select setting > Mobile App






4.      Your browser will split into two portions, left one for D365 web browser while right side for mobile application configuration, like below


 
5.      For this demo, let’s take an example of Customers. Click on create button


6.      We will add a new mobile workspace for Customers and a page for “All customer”


7.      You will be navigated to the next screen for “All customer”, where you need to select fields for this App page. Go to Accounts receivable > All customers and click on “Select fields” in all customer page.





8.      When you click on “Select fields” on AX side “All Customer” form few fields will be highlighted, shown in below image

















9. Click on “+” sign next to each field to add them to your mobile app page. As you select these fields they will appear in right side window where you are configuring your mobile app. Once you select all your required fields click on Done.



10. On the next screen, to set any further property click on the Property button which is available for each selected field.


11. Now click on Back > Done > Save.
12. As a final step, you need to publish this app workspace, select your workspace and click on Publish button on top.


13. You get a system notification on the successful action.


14. I have tested this on an android device, go to your app. I hope you already logged in successfully in the mobile app earlier. Now pull down the screen to refresh ( as we do in most of the mobile app like Facebook, LinkedIn, Outlook). A new workspace must appear in the app, Customers, below are the screenshots from the app.


 






Here the sequence of a field that you selected during field selection for a page is very important, we choose Customer group first than Customer account hence we got Customer group on top of each record. So, choose your fields carefully.

In the next post, we will discuss how to create a new record using the mobile app. We will be continuing the same app there.

Enjoy…!!!

Thanks
Harry

September 15, 2017

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

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

image



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




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

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

Enjoy…!!!

Harry



August 11, 2017

Microsoft Dynamics 365 for Finance and operations CookBook

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 Zaidi here.

Go and get your copy today...

image


Thanks for all your support. Enjoy….

Harry.






July 13, 2017

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

Hi Folks,

Its Party time!!!

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

image

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.


image1

Keep sharing your feedback and queries, Enjoy…

Deepak Agarwal aka Harry


Related Post:

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. 


Enjoy….
Harry
PS: Photo taken from MS site.

July 11, 2017

How to use Form event ‘OnInitialized’ in Dynaics365

Hi Folk,

In Dynamics365 there are many standard events on Forms, similarly like standard methods on a 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 a certain condition. As D365 urge to not to customize ant standard object than write EventHandlers to achieve your requirement. In an earlier version of AX, we simply 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 event handler for the same.
image

Let’s take a look.

Approach: Follow the below step to get this done,

Step 1: Right-click on “OnInitialized’ method and select ‘Copy event handler method’

image


Step 2: Create a new class and paste this method.
/// <summary>
///
     /// </summary>
     /// <param name="sender"></param>
     /// <param name="e"></param>
     [FormDataSourceEventHandler(formDataSourceStr(ProjAdjustmentSplit, TmpProjAdjustmentSplit), FormDataSourceEventType::Initialized)]
     public static void TmpProjAdjustmentSplit_OnInitialized(FormDataSource sender, FormDataSourceEventArgs e)
     {
}

Step 3: Use below code to access form object
TmpProjAdjustmentSplit      tmpProjAdjustmentSplit         = sender.cursor();
         FormDataSource              tmpProjAdjustmentSplit_ds      = sender.formRun().dataSource('TmpProjAdjustmentSplit');
         FormRun                     element                     = sender.formRun();
         FormControl                 projID;
  
         projID= element.design(0).controlName("TmpProjAdjustmentSplit_ProjId");

Step 4: After above declaration now wrtie your actual business logic.
if(ProjParameters::find().myParameter== NoYes::Yes)
         {
             projID.allowEdit(false);
         }
         else
         {
             projID.allowEdit(true);
         }
Step 5: Now go to
Project management and accounting > Periodic > Transactions > Adjust transactions and click on the Adjust button to test your code.

Note: Try to add use the same code on your form and add more field using form control. Make sure you mark this control AutoDeclare = Yes on Form design.  Get the complete code here.


Enjoy…
Harry

June 13, 2017

Export license file [AX2009/2012]

Every now and then, there is a need to export license keys from a system.  I needed to get into the VAR layer to modify the code in a Microsoft VPC, but as we all know, Contoso license keys don't come with the BUS/CUS/VAR access codes.  So I did what any developer would do:
  • Write a job to export the Contoso license key file
  • Import my company's partner license key file
    • DO NOT SYNC when it asks
  • Jump in the VAR layer using our layer access code to make my changes real quick
  • Import back the Contoso license key file I exported from my job and SYNC
Here is said job, enjoy!


June 01, 2017

X++ code for Product image upload in AX

Hi Folks,

In my previous post, I shared the 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 the below methods.



Cheers
Deepak

May 23, 2017

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, 


Hope this will help.
Thanks
Harry


May 19, 2017

Breakpoint not hit in Visual studio [Dynamics 365]

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.”

clip_image001[8]

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

clip_image002[7]

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

clip_image003

Now try to run again, this time breakpoint should hit as expected.

Enjoy…!!!

Harry 

May 13, 2017

Send Message to all Online users [Dynamics 365 FO]

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.

clip_image001[4]

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.

clip_image003[4]

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.

clip_image004[4]

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

Step 6: Now if in case you have to postpone or cancel this activity, choose second option i.e. Cancel message, system will ask which message you want to cancel as there can be multiple messages.
clip_image006[4]

Let’s try to cancel first message that we created in last step. In the right corner, you will found a delete icon, click on that icon and hit yes when ask for confirmation. You will see now only two messages are active here

clip_image007[4]

Now when user will login in next time he/she will not any notification from system.

Enjoy…
-Harry.