• Skip to main content
  • Skip to primary sidebar
  • Home
  • About
  • Recommended Readings
    • 2022 Book Reading
    • 2023 Recommended Readings
    • Book Reading 2024
    • Book Reading 2025
  • Supply Chain Management Guide
  • PKM
  • Microsoft Excel
  • Microsoft Copilot in Office 365
  • Public Wiki Page

Ali Raza Zaidi

A practitioner’s musings on Dynamics 365 Finance and Operations

Dynamics AX 2012

Sales Quotations In Dynamics Ax 2012 R3.

September 11, 2015 by alirazazaidi

Sales process usually starts with Request for Quotation. And result Sales Quotation generates and send to client. These clients were possible two types. Either they were register customer with organization or they were first time come to register. These first time client which possible become customer or reject our quotation handle as Prospect in Dynamics Ax 2012.

These prospects may be person, organization or individuals. They register In Dynamics Ax 2012 is very similarly as customer register. Only difference between customer and prospect is that prospect has no financial impact. They are just record keeping or register sales of Quotation. But in the case of client accepts the sales quotation, the prospect must be converted into customer and sale quotation into sales order.

Now we go to create a new prospect and then send sales quotation, and accept the sales quotation to convert Sales Order.

At the time of writing this article I am using Dynamics Ax 2012 R3 Cu9 with demo license.

Open Ax client and go in Sales and marketing module.

Sales and Marketing=> Common=> Prospects => All prospects

2015-07-24_23-08-45

 

 

 

List page of all prospects open, click on prospect and open a create a new prospect form.

Create-New-Prospect

 

For current article I want to create prospect for person type. I select Person from drop down. Entry required highlighted and click on save and open to prospect detail page,

From detail form you can change Type Id to customer / vendor or let it prospect, I left it as prospect as default value selected. You can also update sales tax group for prospect.

Change-Type

 

 

 

 

Now click on top menu click on sell and then click on Sales Quotation

xss

 

A new Sales Quotation form will open

Form is very similar to sales order, but having very limited option as compare to sales order.

SalesLine

For current example we select two items and described 100 items per 100 dollar as unit price.

Enable1

 

Save it now open to quotation tab. And click on send Quotation

 

Quoation-Send

 

 

 

If you want print on click on “Print quotation” chick box and click on ok

 

Info box appears to show infobox.

InfoBox

 

Now we got feedback from client, for this open sales quotation and from follow tab strip You will find confirm, cancel and lost quotation button.

ConfirmCode

 

 

 

As we member we did not change the type of Prospect to customer so AX will not let you confirm sales quotation. In the case of rejection or cancel you can click on cancel or lost button to reject the sales quotation.

For current example, we assume that our sales quoatation is accepted and new we convert this sale quotation into sales order. First step to convert prospect into customer, for this click on convert to customer , you will find small popup form. Where you can enter customer account.

Convert-to-Customer

 

After entering new customer account, you can check that account number is valid, click on check button, for example I added the small length customer account and following error message shows

ManualEntryRejected

 

Now enter account with required length check and then press ok.

check-button

You can see that after converting prospective into customer, Confirmation button is enabled

Enable1

 

 

 

 

Click on confirm to convert this into sales order

Confirmation-Screen

Click ok, Sales Quotation converts into sales order

confirm

If we open sales order list page we find a new sales order created against sales quotation.

Sales-Order

Exploring data cache in Dynamics Ax 2012

September 7, 2015 by alirazazaidi

In Dynamics Ax 2012, table level cache has been performance improving feature.

In Dynamics Ax 2012 we can set both client and server side (AOS) level caches.

When cache at client and server side enabled. Then user query, first search will be done on client side cache, result not found then Ax tries to locate record at server side. In the case of record not found at server side, they will be fetch from table.

Client side cache is exclusive for every  client, while Server side cache can be access by any client.

 

We can set number of records from System administrator module

server Menu

At performance optimization tab we can set both client side and server side AOS.

2015-09-06_22-41-26

 

In Dynamics Ax 2012, we can set two types of Cache, Single record or set based Cache.

We can set cache type in cacheLookup property of table.

For example we can set cache lookup for custtable as follow

CustTableCahchLookup-001

 

 

In the case of single record based cache, we can set following properties in cache lookup

  • NotInTTS,
  • Found
  • FoundAndEmpty

 

For Set-based cache, we have to set the cache lookup to Entire table.

According to Microsoft Documentation

When the CacheLookup table property is set to EntireTable, all the records in the table are put in the cache only if the WHERE clause in the SELECT statement includes equality tests on all fields of the unique index that is defined in the PrimaryIndex table property.

Following consideration required for Set-based or entire table cache.

  • Cluster index must be set on table so it will quickly load
  • Cache size must be under 218, otherwise cache is moved to disk which is much slower to access.
  • Should be used on lookup tables because data is less there.

 

https://community.dynamics.com/ax/b/axsupport/archive/2015/02/20/dynamics-ax-table-caching-basic-rules

Exploring the Full text index In Dynamics Ax 2012 R3

August 23, 2015 by alirazazaidi

Consider following points for Full text index on Dynamics Ax 2012

  • Full text index used only on text fields on table.
  • They find all records from table which contains the key words
  • Queries can be used to and full text index used in range filters
  • If keywords contains spaces then it will used as “Or” operator.
  • X++ select statement cannot use full text index.

 

Let explore the full text index on our custom table “HSPatientTable”

2015-08-23_1-55-28

And we want full index search of FName of above mentioned table. First of all right click on table and from property window set table group property to “Main”.

2015-08-23_1-58-16

Now expand the full text Index node of table and create a new full index name it as IdxFName and drag drop the Fname in this index.

2015-08-23_2-00-55

Compile and synchronize table so changes reflect at sql server level.

 

Now create Now Ax job and paste following code there

static void Job1(Args _args)

{

HsPatientTable patientTable;

Query query;

QueryBuildDataSource queryBDSource;

QueryBuildRange queryBRange;

QueryRun queryRun; 

delete_from patientTable;

patientTable.HsPatientId ="01";

patientTable.FName =" Ali Raza zaidi";

patientTable.insert();

patientTable.HsPatientId ="02";

patientTable.FName =" Ranjah jogi";

patientTable.insert();

patientTable.HsPatientId ="03";

patientTable.FName ="Waseem akahram";

patientTable.insert();

patientTable.HsPatientId ="04";

patientTable.FName ="Shah jii";

patientTable.insert();

patientTable.HsPatientId ="05";

patientTable.FName ="AX guru";

patientTable.insert(); 

query = new Query();

queryBDSource = query.addDataSource(tableNum(HsPatientTable));

queryBRange = queryBDSource.addRange(fieldNum(HsPatientTable, FName));

 

queryBRange.rangeType(QueryRangeType::FullText);

 

// The space character is treated as a Boolean OR.

queryBRange.value("AX jii");

 

 

queryRun = new QueryRun(query);

while (queryRun.next())

{

patientTable = queryRun.get(tableNum(HsPatientTable));

info (" Patient Id: "  + patientTable.HsPatientId + " , Patient Name: " +patientTable.FName);

}

 

}

I used the value “AX jii”. The space between two words consider as Or and in result it will return two records

2015-08-23_13-41-18

Dimension did not save as Personalization Dynamics Ax 2012 R2, R3

August 21, 2015 by alirazazaidi

Today I got strange query from client that we are adding dimensions like Style in “All production Order” list page using Personalization option. Field added into grid but when we close and reopen the form, it disappear from grid. So there is possible issue with dynamics Ax installation.

ProductionOrder

When I started to investigate, it was only issue with dimension fields ,  if you save any field from Production order it will save, for example If I want to save “BomId”, It is properly save with respect to user and display on grid.


sss

For Dimensions, Please go to View tab and click on Dimension and add Dimension, it will save and will available for all

ddd22

 

 

sss222

Hopes this will helps

Invalid object name “tempd.dbo” Dynamics ax 2012 R2 cu7

August 21, 2015 by alirazazaidi

xyz.png

Yesterday at one of our company client was facing this issue, on every transaction or even on validating the Journal post error popup as

Invalid object name “tempd.dbo.t4887_”.

“Sql statement, select t1.recid from tempdb.”DBO”.t4887_”

 

I feel that this error is due  tempdb space fill in sql server or temp table created in SQL already exists. It did not let delete or create temp tables inside SQL server.  I solve this issue with following work around.

 

  1. Stop AOS.
  2. Stop, analysis services, and SSRS services
  3. Stop Sql server and sql server agent ( If running)
  4. Start SQL server.
  5. Start analysis services and ssrs services.
  6. Start AOS.

Last one week this error is not appear on client.

 

I think there will be planned down time on AX production environment, where AOS and SQL services must be restarted after weekly or monthly basis.

MS Dynamics Ax 2012 Infrastructure ppt

August 16, 2015 by alirazazaidi

Today I was searching information about MS Dynamics Ax 2012 infrastructure, I found old but excellent power point presentation slide for Dynamics Ax 2012 on slide-share by Davy Vliegen
[slideshare id=10382116&doc=infra-111129063457-phpapp02]

Microsoft Dynamics ‘AX 7’ and the Cloud: an analyst’s (pre)view

August 11, 2015 by alirazazaidi

About Ax 7 and Cloud I found very nice paper at Inside Microsoft Dyanmics Ax Blog. They wrote about the paper

In the paper, Mr. Greenbaum explains how the next release of Microsoft Dynamics AX, running on the Microsoft Azure, positions cloud computing for a dramatic and meaningful shift. With a starting discussion of the long-standing customer promises and pain points with regard to ERP, Greenbaum explains the basics of our cloud offering and then describes the benefits to both partners and customers.

AX 7

Paper link is as follow http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-62-70-38/Redefing-the-potential-of-enterprise-cloud-computing-WP-final.pdf

 

and original post  is as follow

http://blogs.msdn.com/b/dax/archive/2015/07/10/read-analyst-joshua-greenbaum-s-perspective-on-microsoft-dynamics-ax-7.aspx

Picture above taking from paper mentioned above link.

Field Mismatch in Union Query in Dynamics Ax 2012 R3

August 5, 2015 by alirazazaidi

Yesterday, after code merger or migrate from Dynamics Ax 2012 R2 to R3, I got very strange errors in AOT Query or static Query. Error was already reported and solved by different MVPs like Martin Darb and Tommy Skaue.
“Field Mismatch in Union Query”.

UninonError

 

In code migration, they increased the field length of EDT. For example for Unknown reason In one of customs code, they increase the “Name” EDT from 60 to 120 character. And this result into creating problems in Union Based Queries.

I solved it following way.

  • Expand the Union Query.
  • Select all views one by one. And check that field on which exception through.
  • Expand the query on which view,
  • Locate the table, and from field I get the EDT name
  • Change the length of EDT and let it synchronize.
  • Expand the table and check the field Length.
  • Expand the View it shows the old length.
  • Expand the query, Right click on it and restored. If length did not reflect change and no customization in View.
  • Right click and delete it. View will delete and restored again from Sys layer. New view will shows the update length.
  • Compile the query.

Reference : https://community.dynamics.com/ax/f/33/t/103490
http://axvuongbao.blogspot.com/2013/12/fix-parameter-could-not-be-serialized.html
http://dynamicsuser.net/forums/p/74382/400861.aspx

Relation between VendPackingSlipTrans and VendInoiceTRans Dynamics Ax 2012

July 31, 2015 by alirazazaidi

Today I got chance to find a relationship between vendor packing list and vendor Invoice.  I was expecting that it there was direct relationship between VendPackingtrans and VendInvocietrans. If you expand VendInvoceTrans, there will be a relation but that relation will never use in Dynamics ax 2012. After searching I found VendPackingSlipQuantityMatch table which has relation between VendPackingTrans and VendInvoiceTrans.

VendPackingSlipTrans _PackingTrans;

VendPackingSlipQuantityMatch _ VendPackingSlipQuantityMatch;

vendInvoicetrans _ vendInvoicetrans;

I got the VendInvoiceTrans and VendPackingTrans as follow.

select firstOnly * from _PackingTrans

join _VendPackingSlipQuantityMatch

where _VendPackingSlipQuantityMatch.InvoiceSourceDocumentLIne ==vendInvoiceTrans.SourceDocumentLine

&& _PackingTrans.SourceDocumentLine == _VendPackingSlipQuantityMatch.PackingSlipSourceDocumentLine;

Custom AIF Service in Dynamics Ax 2012 R3 from Scratch.

July 29, 2015 by alirazazaidi

Today I decide to experiment with custom service. So I decided to create custom table with Name MyColorTable.

 

This table contains only one field Name. and made it unique with no allow duplicate on Index.

MyColorTable

 

If we consider custom service in Dynamics Ax 2012, it contains following objects

 

  • X++ Data contract class
  • X++ Service contract class
  • Service Node
  • Service Group node.

 

Data Contract class

So first we create Data contract class

Suppose Our data contract class name is  ColorDc

 

 

[DataContractAttribute]

class ColorDC

{

Name ColorName;

}

Now add a new method with Name ParmColorName and set its as

 

 

[ DataMemberAttribute('ColorName')]

public Name parmColorName(Name _ColorName=ColorName)

{

ColorName=_ColorName;

return ColorName;

}

 

 

Service contract class:

Now we write a Service class which contains Three method Purpose of these method to explore the require attribute for getting parameter in service method and return list from service method.

InsertColor. (This method contains single color)

InsertColorList (This method take list of colorDC as parameter).

GetColorList ( This method return list of colorDC).

 

[SysEntryPointAttribute(true),

AifCollectionTypeAttribute('Colorobj', Types::Class)]

public void InsertColor(ColorDC Colorobj)

{

MyColorTable _Color;

Name _Name;

 

_Name = Colorobj.parmColorName();

 

select * from _Color where _Color.Name== _Name;

 

if (_Color==null)

{

try

{

ttsBegin;

_Color.Name = _Name;

_Color.insert();

 

ttsCommit;

}

catch

{

ttsAbort;

}

 

}

}

In above method we add some attribute which allow this method to act as web method and attribute help us define the expected parameter for this method call.

 

Now we call create another method, here attributes also described method as webmethod and also method expect what type of parameter.

[DataMemberAttribute("InsertColorList"),

AifCollectionTypeAttribute("ColorList",Types::Class, classStr(ColorDC))

]

public Void InsertColorList(List ColorList )

{

ListIterator  iterator;

ListEnumerator  enumerator;

ListIterator   literator;

ColorDC       _color;

 

 

enumerator = ColorList.getEnumerator();

 

while(enumerator.moveNext())

{

_color= enumerator.current();

if (_color !=null)

{

this.InsertColor(_color);

}

}

 

}

 

 

Now get method which return all color in Ax.

[SysEntryPointAttribute(true),

AifCollectionTypeAttribute('return', Types::Class, classStr(ColorDC))]

public list GetColorList()

{

ColorDC Colorobj;

List _ColorList = new List(Types::Class);

MyColorTable  Colorbuf;

while select * from Colorbuf

{

 

Colorobj = new ColorDC();

Colorobj.parmColorName(Colorbuf.Name);

_ColorList.addEnd(Colorobj);

}

return _ColorList;

}

Now compile it now

Service Object:

create a service object and set Service contract class there

New Service

Expand ColorService object and Right click on Operations and click on add method, this way we can restrict which method need to expose in service or which method need not.

AddOperation

2015-07-28_6-40-49

Click on all check boxes and enabled them

Service Group:

Create a new service group and drag and drop service object under it.

2015-07-28_6-41-15

 

 

 

Right click on ColorServiceGroup and deploy the service

Deploy

 

Wait and let It deploy Info box shows the message that service is deployed successfully

2015-07-28_12-38-21

 

 

No service is successfully deployed, Now open Ax client , from Administration section. Setup=> AIF => Inbond port.

AIF

Copy WSDL URI.

 

Open Visual studio and create a new Console application for testing the code.

Right click on references and ad service reference

ssss

 

2015-07-28_13-01-06

 

 

 

 

First we call insert the records in service.

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

 

namespace ConsoleApplication2

{

class Program

{

static void Main(string[] args)

{

ColorServiceGroup.ColorDC cd1 = new ColorServiceGroup.ColorDC();

cd1.ColorName = "Red";

ColorServiceGroup.ColorDC cd2 = new ColorServiceGroup.ColorDC();

cd2.ColorName = "Blue";

ColorServiceGroup.ColorDC cd3 = new ColorServiceGroup.ColorDC();

cd3.ColorName = "Yellow";

 

ColorServiceGroup.ColorDC[] DcList = new ColorServiceGroup.ColorDC[] { cd1, cd2, cd3 };

ColorServiceGroup.ColorServiceClient _Client = new ColorServiceGroup.ColorServiceClient();

 

ColorServiceGroup.CallContext _CallContext = new ColorServiceGroup.CallContext();

_CallContext.Company = "USMF";

_Client.InsertColorList(_CallContext, DcList);

 

 

 

 

 

}

}

}

When I run the above code in Visual studio  records are successfully inserted in original table.

TableBrowser

 

 

Now we call list of colors exist in Dynamics Ax 2012.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

 

namespace ConsoleApplication2

{

class Program

{

static void Main(string[] args)

{

 

 

 

ColorServiceGroup.ColorServiceClient _Client = new ColorServiceGroup.ColorServiceClient();

 

ColorServiceGroup.CallContext _CallContext = new ColorServiceGroup.CallContext();

_CallContext.Company = "USMF";

ColorServiceGroup.ColorDC[] _DcList=   _Client.GetColorList(_CallContext);

//    ColorServiceGroup.ColorDC _Dc ;

foreach (ColorServiceGroup.ColorDC _Dc in _DcList)

{

Console.WriteLine(_Dc.ColorName);

 

}

 

Console.ReadKey();

 

 

 

}

}

}

When I run the above code, all records exists in Ax display on c# console

2015-07-29_15-49-25

 

« Previous Page
Next Page »

Primary Sidebar

About

I am Dynamics AX/365 Finance and Operations consultant with years of implementation experience. I has helped several businesses implement and succeed with Dynamics AX/365 Finance and Operations. The goal of this website is to share insights, tips, and tricks to help end users and IT professionals.

Legal

Content published on this website are opinions, insights, tips, and tricks we have gained from years of Dynamics consulting and may not represent the opinions or views of any current or past employer. Any changes to an ERP system should be thoroughly tested before implementation.

Categories

  • Accounts Payable (2)
  • Advance Warehouse (2)
  • AI (3)
  • Asset Management (3)
  • Azure Functions (1)
  • Books (6)
  • Certification Guide (3)
  • ChatGPT (3)
  • Claude (1)
  • Customization Tips for D365 for Finance and Operations (63)
  • D365OF (60)
  • Data Management (1)
  • database restore (1)
  • Dynamics 365 (59)
  • Dynamics 365 for finance and operations (139)
  • Dynamics 365 for Operations (174)
  • Dynamics AX (AX 7) (134)
  • Dynamics AX 2012 (274)
  • Dynamics Ax 2012 Forms (13)
  • Dynamics Ax 2012 functional side (16)
  • Dynamics Ax 2012 Reporting SSRS Reports. (31)
  • Dynamics Ax 2012 Technical Side (52)
  • Dynamics Ax 7 (65)
  • Exam MB-330: Microsoft Dynamics 365 Supply Chain Management (7)
  • Excel Addin (1)
  • Favorites (12)
  • Financial Modules (6)
  • Functional (8)
  • General Journal (1)
  • Implementations (1)
  • Ledger (1)
  • Lifecycle Services (1)
  • Logseq (4)
  • Management Reporter (1)
  • Microsoft Excel (4)
  • MS Dynamics Ax 7 (64)
  • MVP summit (1)
  • MVP summit 2016 (1)
  • New Dynamics Ax (19)
  • Non Defined (9)
  • Note taking Apps (2)
  • Obsidian (4)
  • Personal Knowledge Management (3)
  • PKM (16)
  • Power Platform (6)
  • Procurement (5)
  • procurement and sourcing (6)
  • Product Information Management (4)
  • Product Management (6)
  • Production Control D365 for Finance and Operations (10)
  • Sale Order Process (10)
  • Sale Order Processing (10)
  • Sales and Distribution (5)
  • Soft Skill (1)
  • Supply Chain Management D365 F&O (5)
  • Tips and tricks (278)
  • Uncategorized (165)
  • Upgrade (1)
  • Web Cast (7)
  • White papers (4)
  • X++ (10)

Wiki

  • SCM

Copyright © 2026 · Magazine Pro On Genesis Framework · WordPress · Log in