Wednesday, 23 January 2019

What are models in d365 ? Interview questions

What are models in d365 ?
A Dynamics AX model is a group of elements that constitutes a distributable software solution (including customizations of an existing solution). A model is a design-time concept. An example of models: warehouse management model, application suite ,etc.
Model can have one or more projects.
Model may only belong to one package.
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/dev-tools/models
Thanks,
Vikas Mehta

explain the concept of extensions

concept of extensions d365

An extension is a way to add functionality to an object in D365FO without modifying the base code of that object.  

Your extensions are compiled into their own DLLs, which are separate from the D365 base system libraries. It also makes it easier for Microsoft to patch their sys layer code.

Microsoft has added to allow customizations without allowing the base code to be changed, because they plan to not allow any overlayering of SYS layer code. 

https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/extensibility/customization-overlayering-extensions

thanks,
Vikas Mehta.

Wednesday, 9 January 2019

WHATS NEW IN D365 :MICROSOFT DYNAMICS D365

WHATS NEW IN D365 
difference betweeen ax 2012 and d365
Microsoft Dynamics 365 Finance and Operation has been completely revamped from its previous version of AX 2012.from technical perspective as well as functional perspective.

Below are some of the changes :
  1. Coding is being done in Visual Studio
  2. VSTS is being used for versioning .
  3. Lots of enhancements have been done to allow integration with REST protocol and java script .
  4. LCS is the tool now used to import and export or deploy/move projects from one environment to another
  5. POWER BI can now easily embedded in D365 with simple setups and configurations.
  6. D365 can now only be viewed from the browser and there is no client required to install separately.
  7. D365 is now hosted on IIS.
  8. DATA Entities are used in D365 for import and export functionality which can be easily created by an end user. They are used for integration perspective also.
  9. Override has been stopped and in case of any changes you will have to use extensions.
  10. A model needs to be mandatorily created/referred for development perspective.
  11. New workspace
  12. New set of form patterns which needs to be applied mandatorily.
  13. Enhanced integrations with Excel and Odata technology.
  14. Hotfixes and updates will be applied 
for more information visit the below site :
https://docs.microsoft.com/en-us/dynamics365/unified-operations/fin-and-ops/get-started/whats-new-changed

Thanks,
Vikas Mehta.

What is LCS MICROSOFT DYNAMICS D365 Lifecycle Services

What is LCS ?

LCS stands for Life cycle services.

It is a cloud based central repository for Microsoft Dynamics 365 Finance and Operations and to prepare and deploy projects which is called "Life Cycle Service".

You will need a microsoft account in order to login to the LCS portal.
https://lcs.dynamics.com

Once you have an associated onmicrosoft.com account you can login and create projects which are then linked to the VSTS services.

This helps the manager to have a high level overview of all the projects and the environments within a single window and manage it.
What is LCS, D365 Lifecycle Services, MICROSOFT DYNAMICS D365 Lifecycle Services, "Life Cycle Service".LCS portal.,
MICROSOFT DYNAMICS D365 Lifecycle Services


User/admin can do all the admin related activities from the LCS portal itself.

You can create as well as deploy new environments via LCS portal.
What is LCS, D365 Lifecycle Services, MICROSOFT DYNAMICS D365 Lifecycle Services, "Life Cycle Service".LCS portal.,
For more information visit the below link.
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/lifecycle-services/lcs.

Thanks,
VIKAS  MEHTA

Tuesday, 8 January 2019

Change number of decimals in D365 finance and operations Dynamcis AX

HI,

IN ORDER TO CHANGE THE NO OF DECIMALS IN ANY FORM IN D365 
YOU WILL FIRST NEED TO CHECK THE PROPERTIES OF THE FIELD AT THE TABLE LEVEL
IN CASE THERE IS ANY EDT ATTACHED TO IT THEN CHECK THE "NO OF DECIMALS" FOR THE EDT .
ALSO IF THE EDT IS FURTHER EXTENDED THEN THE PROPERTY OF THE EXTENDED EDT NEEDS TO BE CHECKED.
THIS WILL ALSO EFFECT THE OTHER FIELDS WHICH ARE ALSO EXTENDING THE SAME EDT.

SO THE BEST APPROCH IS TO CREATE A NEW EDT WITH 5 DECIMAL PLACES AND ASSIGN THE EDT TO THE FIELD IN QUESTION.
THANKS,

 VIKAS MEHTA

D365 get current record in form Control Event on button clicked

Get current record in form control event

[FormControlEventHandler(formControlStr(CustomForm, CustomButton), FormControlEventType::Clicked)]
public static void CustomButton_OnClicked(FormControl sender, FormControlEventArgs e)
{
// ds number 1 is for the first datasource
CustomTable callerRec = sender.formRun().dataSource(1).cursor();
}

thanks

D365 get form Datasource and selected record buffer Event handler

D365 get form Datasource and selected record buffer Event handler

[FormDataSourceEventHandler(formDataSourceStr(Salestable, SalesTableDS), FormDataSourceEventType::Written)] 

public static void SalesTableDS_OnWritten(FormDataSource sender, FormDataSourceEventArgs e)
{
FormRun formRun = sender.formRun() as FormRun;
// you can call form methods here
formRun.callMethod();

// Get the selected datasource record from the grid
TableName tableBuffer = sender.cursor();

// Get datasource variable
FormDataSource dsVariable = sender.formRun().dataSource(“TableName”);
}

D365 code to keep form record focus on selected record in GRID

Hi,
many times we get the requirement that upon update we need only that selected record to be updated and then after updation that record needs to be focused .

formDatasourcename_ds.findrecord(tablename)

thanks

ACTIVE METHOD IN D365 FORM DATASOURCE

FORM ACTIVE METHOD IN D365 DATASOURCE EVENT HANDLERS FOR Activated METHOD 

How to get the event handler for the init method for Init method in D365 forms
You can just write the below code in any new class or else if you have an existing one then just simply copy the code in the class.

The class declaration should read:
[ExtensionOf(formStr(FormName))]final class FormName_Extension{}

So if the form name is SalesTable then the code will be 
[ExtensionOf(formStr(SalesTable ))]
final class SalesTable_Extension{}

In some cases even a class without the extension signature i.e. [ExtensionOf(formStr(SalesTable ))] might not be required but in that case  the this object will not provide the objects in the intellisense.

Note that the class declaration is Final and cannot be further extended.
[FormDataSourceEventHandler(formDataSourceStr(Salestable, Salestable), FormDataSourceEventType::Activated)]
    public static void Salestable_OnActivated(FormDataSource sender, FormDataSourceEventArgs e)
    {
        Salestable           Salestable     = sender.cursor();
        FormDataSource      Salestable_ds  = sender.formRun().dataSource("Salestable");
        FormRun             element       = sender.formRun();
        FormControl         myNewButton   = element.design(0).controlName("anybutton");

        anybutton.enabled(false);
    }

}

D365 Form Init Event handler Pre and Post FormEventType::Initialized

FORM INIT DATASOURCE PRE AND POST EVENT HANDLERS FOR INIT METHOD

How to get the event handler for the init method for Init method in D365 forms
You can just write the below code in any new class or else if you have an existing one then just simply copy the code in the class.

The class declaration should read:
[ExtensionOf(formStr(FormName))]final class FormName_Extension{}

So if the form name is SalesTable then the code will be 
[ExtensionOf(formStr(SalesTable ))]
final class SalesTable_Extension{}

In some cases even a class without the extension signature i.e. [ExtensionOf(formStr(SalesTable ))] might not be required but in that case  the this object will not provide the objects in the intellisense.

Note that the class declaration is Final and cannot be further extended.

[FormEventHandler(formStr(SalesTable), FormEventType::Initialized)]

public static void SalesTable_OnInitialized(xFormRun sender, FormEventArgs e)

{

FormDataSource SalesTable_ds = sender.dataSource(formDataSourceStr(SalesTable, SalesTableDS));

…

}

[PostHandlerFor(formStr(InventTable), formMethodStr(InventTable, init))]
    public static void InventTable_Post_init(XppPrePostArgs _args)
    {
        FormRun fr = _args.getThis();
        Common common = fr.args().record();
        CustTable custTable;

        if (common is CustTable)
        {
            custTable = common;
         // do your coding here
        }
    }

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++  Introduction In our previous posts, we explored what Copilot can do o...