Friday 4 December 2015

Synchronize Your Contacts Between Dynamics AX And Outlook And Back Again

Synchronize Your Contacts Between Dynamics AX And Outlook And Back Again

If you have linked Dynamics AX with your local version of Microsoft Outlook, then you have probably ran the synchronization that adds all of the appointments, tasks, and also the contacts to Outlook.  But there is a more powerful option that allows you to synchronize not only from Dynamics AX and Outlook, but with Outlook back to Dynamics AX giving you an even more useful form of contact synchronization.


This is a great way to keep your contacts up to date, and also to populate Dynamics AX with all of your contact data without having to key in all of the people by hand, and also keep it up to date because it synchronizes both ways.


Remember, a contact does not become less useful if you share it with your friends.


How To Do It…

Start of by adding contacts to Dynamics AX.


20140212.01


Then click on the Synchronize menu item within the Microsoft Outlook Synchronization folder of the Periodic group of the Home area page.


When the My Contacts maintenance form is displayed, to synchronize the contacts within Dynamics AX to Outlook, click on the Add contacts from Microsoft Dynamics menu item under the Add contacts menu item.


20140212.02


When the Select contacts from Microsoft Dynamics AX dialog box is displayed, all of the contacts that have not currently been synchronized with Outlook will be displayed.  Check all of the contacts that you want to synchronize and then click on the Add to my contacts button.


20140212.03


When you return to My contacts all the contacts will now have an link back to Outlook.


20140212.04


If you open up Outlook then all of the contact information will be synchronized.


20140212.05


Next, add a contact within Outlook that doesn’t exist within Dynamics AX.
One tip is to ensure that the Country/Region for the address is United States.



20140212.06



Return to the My Contacts maintenance form is displayed, and to synchronize the contacts within Outlook with Dynamics AX, click on the Add contacts from Microsoft Outlook menu item under the Add contacts menu item.


20140212.07


When the Select contacts from Microsoft Outlook dialog box is displayed, all of the contacts that have not currently been synchronized Outlook to Dynamics AX will be displayed.



20140212.08


Check all of the contacts that you want to synchronize and also add the Contact for which will be the company that you want to associate the contact with.

When you are finished, click on the Create button.


20140212.09


When you return to My contacts all the contacts from Outlook will now be added to the list of synchronized contacts.



20140212.10



For any of the contacts, where they originated within Outlook, you can update the records information – like the phone number, or the email address.



20140212.11


To update Dynamics AX, all you need to do is click on the Synchronize button within the menu bar of the My Contacts maintenance form.



20140212.12


When you look at the contact within Dynamics AX, the details will be changed.


20140212.13

Synchronize Your Contacts Between Dynamics AX And Outlook And Back Again

Synchronize Your Contacts Between Dynamics AX And Outlook And Back Again

If you have linked Dynamics AX with your local version of Microsoft Outlook, then you have probably ran the synchronization that adds all of the appointments, tasks, and also the contacts to Outlook.  But there is a more powerful option that allows you to synchronize not only from Dynamics AX and Outlook, but with Outlook back to Dynamics AX giving you an even more useful form of contact synchronization.


This is a great way to keep your contacts up to date, and also to populate Dynamics AX with all of your contact data without having to key in all of the people by hand, and also keep it up to date because it synchronizes both ways.


Remember, a contact does not become less useful if you share it with your friends.


How To Do It…

Start of by adding contacts to Dynamics AX.


20140212.01


Then click on the Synchronize menu item within the Microsoft Outlook Synchronization folder of the Periodic group of the Home area page.


When the My Contacts maintenance form is displayed, to synchronize the contacts within Dynamics AX to Outlook, click on the Add contacts from Microsoft Dynamics menu item under the Add contacts menu item.


20140212.02


When the Select contacts from Microsoft Dynamics AX dialog box is displayed, all of the contacts that have not currently been synchronized with Outlook will be displayed.  Check all of the contacts that you want to synchronize and then click on the Add to my contacts button.


20140212.03


When you return to My contacts all the contacts will now have an link back to Outlook.


20140212.04


If you open up Outlook then all of the contact information will be synchronized.


20140212.05


Next, add a contact within Outlook that doesn’t exist within Dynamics AX.
One tip is to ensure that the Country/Region for the address is United States.



20140212.06



Return to the My Contacts maintenance form is displayed, and to synchronize the contacts within Outlook with Dynamics AX, click on the Add contacts from Microsoft Outlook menu item under the Add contacts menu item.


20140212.07


When the Select contacts from Microsoft Outlook dialog box is displayed, all of the contacts that have not currently been synchronized Outlook to Dynamics AX will be displayed.



20140212.08


Check all of the contacts that you want to synchronize and also add the Contact for which will be the company that you want to associate the contact with.

When you are finished, click on the Create button.


20140212.09


When you return to My contacts all the contacts from Outlook will now be added to the list of synchronized contacts.



20140212.10



For any of the contacts, where they originated within Outlook, you can update the records information – like the phone number, or the email address.



20140212.11


To update Dynamics AX, all you need to do is click on the Synchronize button within the menu bar of the My Contacts maintenance form.



20140212.12


When you look at the contact within Dynamics AX, the details will be changed.


20140212.13

Using the “Managerial Hierarchy” option in workflows

Scenario: client’s requirement is to configure the workflow in such a way that “When a purchase requisition is submitted by an employee, it must be routed to the person to whom the employee reports to”


Let’s consider that the below screen shot is the reporting hierarchy for the employee. We are considering “James” persona for this demonstration. As per our example, we are configuring the workflow to route the Purchase requisition to Adam who is an immediate manager to James.




Position Hierarchy



As you already knew, we are obviously going to configure it using the “Managerial Hierarchy”.
-Managerial Hierarchy works based on the “position hierarchy” that is defined in the organization.
-Make sure that the employees used in the position hierarchy are linked with the corresponding Ax users in System administration>users form



-Position hierarchy will be built based on the “reports to position” field of the corresponding Position. To know how to create the position hierarchy – click this – Position Hierarchy
In the “workflow” step use the assignment type as “Hierarchy”



Assignment type - Hierarchy

Select the “Hierarchy type” as “Managerial Hierarchy”, set the “Start from” field as “Requester”. So that system starts finding the “Position hierarchy” from the person who is requesting the PR.

Workflow - Managerial Hierarchy



“Stop when the following condition is met”:
Basically, “Managerial hierarchy” routes the document to immediate reporting position. Once it is approved, it will be routed to the next manager, so it keeps routing it to the next manager in the hierarchy.



Using the “Stop when the following condition is met”, we should specify where it must stop the assignment. So, as per our position hierarchy, if James submits requisition, it goes to Adam, next to Alex and next to Sunny.



 We are stopping the assignment using the “line manager level” condition which is set to 1 i.e. employee.line manager level = 1.



Above stop condition stops the assignment by assigning only to line manager of level1. The PR will be assigned only to the immediate position. As per the considered position hierarchy, it will be assigned to employee “Adam” and once Adam approves it the “PR status” will be shown as “Approved”



If the stop condition is set to “stop where employee.Line manager level =2”, the PR will be routed to Adam, and once Adam approves it, it will be routed to “Alex”.


Note: above explanation is in accordance with “Hierarchy options – “Assign to all users retrieved”.


Hierarchy options – “Assign to last user retrieved”:

Hieararchy options - Last user retrieved

Let’s go with below example.


If the stop condition is set to “stop where employee.Line manager level =2”, the PR will be routed to directly to Alex and it will not be routed to “Adam”. As the last user retrieved with hierarchy based on the above condition is “Alex”.


You have different options that can be used in “stop condition” as per the requirements.
Hope this post clearly explains how you can use the “Managerial hierarchy” in your workflows. Your suggestions and feedback are most welcoming.
 

Using the “Managerial Hierarchy” option in workflows

Scenario: client’s requirement is to configure the workflow in such a way that “When a purchase requisition is submitted by an employee, it must be routed to the person to whom the employee reports to”


Let’s consider that the below screen shot is the reporting hierarchy for the employee. We are considering “James” persona for this demonstration. As per our example, we are configuring the workflow to route the Purchase requisition to Adam who is an immediate manager to James.




Position Hierarchy



As you already knew, we are obviously going to configure it using the “Managerial Hierarchy”.
-Managerial Hierarchy works based on the “position hierarchy” that is defined in the organization.
-Make sure that the employees used in the position hierarchy are linked with the corresponding Ax users in System administration>users form



-Position hierarchy will be built based on the “reports to position” field of the corresponding Position. To know how to create the position hierarchy – click this – Position Hierarchy
In the “workflow” step use the assignment type as “Hierarchy”



Assignment type - Hierarchy

Select the “Hierarchy type” as “Managerial Hierarchy”, set the “Start from” field as “Requester”. So that system starts finding the “Position hierarchy” from the person who is requesting the PR.

Workflow - Managerial Hierarchy



“Stop when the following condition is met”:
Basically, “Managerial hierarchy” routes the document to immediate reporting position. Once it is approved, it will be routed to the next manager, so it keeps routing it to the next manager in the hierarchy.



Using the “Stop when the following condition is met”, we should specify where it must stop the assignment. So, as per our position hierarchy, if James submits requisition, it goes to Adam, next to Alex and next to Sunny.



 We are stopping the assignment using the “line manager level” condition which is set to 1 i.e. employee.line manager level = 1.



Above stop condition stops the assignment by assigning only to line manager of level1. The PR will be assigned only to the immediate position. As per the considered position hierarchy, it will be assigned to employee “Adam” and once Adam approves it the “PR status” will be shown as “Approved”



If the stop condition is set to “stop where employee.Line manager level =2”, the PR will be routed to Adam, and once Adam approves it, it will be routed to “Alex”.


Note: above explanation is in accordance with “Hierarchy options – “Assign to all users retrieved”.


Hierarchy options – “Assign to last user retrieved”:

Hieararchy options - Last user retrieved

Let’s go with below example.


If the stop condition is set to “stop where employee.Line manager level =2”, the PR will be routed to directly to Alex and it will not be routed to “Adam”. As the last user retrieved with hierarchy based on the above condition is “Alex”.


You have different options that can be used in “stop condition” as per the requirements.
Hope this post clearly explains how you can use the “Managerial hierarchy” in your workflows. Your suggestions and feedback are most welcoming.
 

Dynamics Ax 2012 : Exploring the Cross company Queries in dynamics Ax 2012

Static AOT Query:
You can set Allow cross company true By properties of AOT Query .

Cross Company

X++ Query object:
One way to create query in dynamics Ax is Query object. You can add by following way.

Query query;

QueryRun queryRun;

QueryBuildRange queryBuildRange;

QueryBuildDataSource queryBuildDataSource;

query = new Query();

queryBuildDataSource = query.addDataSource(TableNum(CustTable));

query.allowCrossCompany(true);

//Executes query built so far

queryRun = new QueryRun(query);

queryRun.allowCrossCompany(true);
This is most fastest way to get cross company data.

While select Query:

There two ways for Get cross Company query and or Query inside the change company statement.
Cross company Keyword:
Add cross company query inside the while select statement to extract data all legal entities in Dynamics AX as  follow code.
Custtable _CustTable;

While select crosscompany * from _Custtable

{

Info (_Custtable.AccountNum + “   :  “ + int642str(_Custtable.DataAreaId);

}

If you want to restrict the query to fetch data from limited legal Entities you have to use a container as follow.

Container _ListOfLegalEntites ={ ‘mazang’,’Jubergi’,’Urdu Bazar’};

While select  crosscompany:_ListOfLegalEntites * from _Cust

{

Info(_Custtable.AccountNum + “  :  “ + _Custtable.DataAreaId);

}

Change Company Keyword:

One method is to use change company keyword. It is most time consuming method. To reduce its time, we have rest the table to null when Change Company happened. In Dynamics All legal entities name stored at  DataArea table we use this table to get the list of datarea and used inside the changeCompany  query on it as follow.
DataArea _DataArea;

Custtable _Custtable;

While select Id from _DataArea

changeCompany(_DataArea.Id)

{

_Custtable= null;

While select * from _Custtable

{

Info(_Custtable.AccountNum +”  :   “ + _Custtable.AreaId);

}

}



Dynamics Ax 2012 : Exploring the Cross company Queries in dynamics Ax 2012

Static AOT Query:
You can set Allow cross company true By properties of AOT Query .

Cross Company

X++ Query object:
One way to create query in dynamics Ax is Query object. You can add by following way.

Query query;

QueryRun queryRun;

QueryBuildRange queryBuildRange;

QueryBuildDataSource queryBuildDataSource;

query = new Query();

queryBuildDataSource = query.addDataSource(TableNum(CustTable));

query.allowCrossCompany(true);

//Executes query built so far

queryRun = new QueryRun(query);

queryRun.allowCrossCompany(true);
This is most fastest way to get cross company data.

While select Query:

There two ways for Get cross Company query and or Query inside the change company statement.
Cross company Keyword:
Add cross company query inside the while select statement to extract data all legal entities in Dynamics AX as  follow code.
Custtable _CustTable;

While select crosscompany * from _Custtable

{

Info (_Custtable.AccountNum + “   :  “ + int642str(_Custtable.DataAreaId);

}

If you want to restrict the query to fetch data from limited legal Entities you have to use a container as follow.

Container _ListOfLegalEntites ={ ‘mazang’,’Jubergi’,’Urdu Bazar’};

While select  crosscompany:_ListOfLegalEntites * from _Cust

{

Info(_Custtable.AccountNum + “  :  “ + _Custtable.DataAreaId);

}

Change Company Keyword:

One method is to use change company keyword. It is most time consuming method. To reduce its time, we have rest the table to null when Change Company happened. In Dynamics All legal entities name stored at  DataArea table we use this table to get the list of datarea and used inside the changeCompany  query on it as follow.
DataArea _DataArea;

Custtable _Custtable;

While select Id from _DataArea

changeCompany(_DataArea.Id)

{

_Custtable= null;

While select * from _Custtable

{

Info(_Custtable.AccountNum +”  :   “ + _Custtable.AreaId);

}

}