Friday 29 November 2013

"No channel configuration could be found in the database" when publish Online store

Just a quick post regarding the error "No channel configuration could be found in the database" during publishing of Online store at Dynamics AX 2012 R2 Retail module.

There could be a few different reason to this error, but for my case, it was due to the initial synchronization job has not been run yet.

Path: Retail > Periodic  Data distribution > Distribution schedule > Select job "A-0001_OC" and click "Run directly".







Thursday 21 November 2013

Dynamics AX 2012 R2 Retail deployment with SQL Server named instance

Just a quick post to share the experience on deploying Dynamics AX 2012 R2 Retail online store with SQL Server named instance.
The deployment is done by following the guide at: http://technet.microsoft.com/en-us/library/jj991927.aspx

In brief:
  • The Online store deployment script is not written to covers SQL Server named instance
  • If you’re using a named instance instead of default instance, the easiest way is to make the named instance listen to default port (act like a default instance)

More details:

I was doing a fresh installation (Windows Server 2012, SQL Server 2012, SharePoint 2013, Dynamics AX 2012 R2, and their respective Service Pack or Cumulative Update).

All goes well until I reach the Online store deployment stage, the PowerShell script “InstallPrereqs-SPFarm.ps1” is complaining the server cannot be pinged. Digging down to the script, it was testing the connection to the server by using the instance name.




Below is part of the “oob-topology.xml” file.
    <Database install="true" dropifexists="true">
      <ServerName>UKLON--VS-W2DV2\SQLSERVER2012</ServerName>
      <DatabaseName>SpFBA</DatabaseName>
      <WindowsLogin id="RetailFBAFullAccessUsers" GroupName="UKLON--VS-W2DV2\RetailFBAFullAccessUsers" CreateIfNotExists="true" MappedSqlRoleName="aspnet_Membership_FullAccess" />
    </Database>
    <WindowsGroupMemberShips>
      <add MachineName="UKLON--VS-W2DV2" GroupName="RetailFBAFullAccessUsers" UserName="TECTURA\sharepointadmin" />
      <add MachineName="UKLON--VS-W2DV2" GroupName="RetailFBAFullAccessUsers" UserName="TECTURA\sharepointadmin" />
</WindowsGroupMemberShips>

Reading the script further, it was found that it assume the SQL server is a default instance, therefore using the server name for the following usage:
  • To access the SQL server instance / configure SQL access
  • To access Windows server / configure security group
  • To check/validate the server name match the security group server name

    Due to it assume the SQL Server is default instance, the server name itself would be the name of the Windows server as well. 
    It then compare this against the machine name. This won’t cause issue if it is a default instance, which both the SQL Server instance name and the Windows server name would be the same. But if you have a named instance for your SQL Server, this would cause issue, it is comparing “ServerName\NamedInstance” against “ServerName”, which give error due to mismatch.

Initially I thought I would just change the “oob-topology.xml” file to use the SQL server named instance as “ServerName” and the Windows server name as “MachineName”.

Then make some changes to the script to cater to this, but it seems that it is used in many places, changing it bit by bit and keep hitting error due to the same reason from various different place is not fun.

So I took another approach, to make the SQL server named instance to “act” like a default instance, that way it can have the same value for both the “ServerName” and “MachineName”.

To do this, below are the steps:
  1. Go to: SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for <theNamedInstance>

  2. Enable the “TCP/IP” is it hasn’t been enabled
  3. Then right click on the “TCP/IP” and click on “Properties”

  4. Click on “IP Addresses” tab, scroll to the bottom

  5. At the “IPAll”, empty the “TCP Dynamic Ports” and enter ‘1433’ for “TCP Port”
  6. Click “OK” to apply and close it, restart SQL Server as needed

This will make the SQL Server named instance listen to port 1433 (default port). Therefore it can access the SQL Server named instance by both the following:
  • ServerName\NamedInstance
    Eg. In my case: UKLON--VS-W2DV2\SQLSERVER2012
  • ServerName
    Eg. In my case: UKLON--VS-W2DV2

    Screenshot showing the SQL Server accessible by both the server name itself and the named instance as well.

Then change the “oob-topology.xml” file to use the server name only.
    <Database install="true" dropifexists="true">
      <ServerName>UKLON--VS-W2DV2</ServerName>
      <DatabaseName>SpFBA</DatabaseName>
      <WindowsLogin id="RetailFBAFullAccessUsers" GroupName="UKLON--VS-W2DV2\RetailFBAFullAccessUsers" CreateIfNotExists="true" MappedSqlRoleName="aspnet_Membership_FullAccess" />
    </Database>
    <WindowsGroupMemberShips>
      <add MachineName="UKLON--VS-W2DV2" GroupName="RetailFBAFullAccessUsers" UserName="TECTURA\sharepointadmin" />
      <add MachineName="UKLON--VS-W2DV2" GroupName="RetailFBAFullAccessUsers" UserName="TECTURA\sharepointadmin" />
</WindowsGroupMemberShips>

Wednesday 9 October 2013

WCF settings error on new AX 2012 AOS installation

It is quite common to have a few different instance installed at Development machine. Sometimes developer make a duplicate copy of client's LIVE environment just to test out some hotfix. Below is one of the scenario which cause the error - "The specified client configuration does not contain valid WCF settings".
  1. Backup an AX 2012 database
  2. Restore as another database name
  3. Install a new AOS instance at another machine
  4. Configure this new AOS to point to the database restored at Step #2
  5. Start up AOS and login to AX
  6. The error "The specified client configuration does not contain valid WCF settings" pops up
Trying to create sales order will throw error (so does a lot of other functionality).

*During the creation of this new instance, the CIL is not recompile

To fix this:
  1. Run a Full CIL generation
  2. On the AX Client Configuration Utility, update the config using Configure Services


Thursday 3 October 2013

Sales orders cannot be rearranged when individual sales orders are tax regulated

Another quick note regarding tax regulation error.

Posting
+-- Tax regulations are found
 |   +-- Tax is regulated on sales order ID 008-SOD00163199
 |   +-- Sales orders cannot be rearranged when individual sales orders are tax regulated.
 |   +-- Remove the regulation on the orders, rearrange and regulate the tax on the summary order.
+-- Update has been cancelled because of an error.




Example
1. An order is created
2. User manually alter the tax [Sales/Purchase order (form) > Sell/Purchase (tab) > Tax (group) > VAT]
3. Posted invoice
4. Added new line to the order
5. Post invoice and error occur

Resolution
As indicated in the error message, reset the tax
1. Go to Sales/Purchase order (form) > Sell/Purchase (tab) > Tax (group) > VAT
2. Click on the "Adjustment" tab
3. Click on the "Reset actuals to calculated" and close the form
4. Proceed to invoice the order, adjust the tax in the posting form (VAT button on the right) before post it

Turn on IncludeExceptionDetailInFaults for service error in Dynamics AX

Just a quick post regarding turning on IncludeExceptionDetailInFaults for service error in Dynamics AX 2012. I'm using SOAPUI for the services testing and hit an error as below.

Error (before turn on IncludeExceptionDetailInFaults)
The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.


Turn on IncludeExceptionDetailInFaults
Identify the service you're testing, then go to the path below (replace the <ServiceName> with the service name).
C:\Program Files\Microsoft Dynamics AX\60\AifWebServices\<ServiceName>\web.config
*If you installation is not at the default location, you'll have to change the path to your installation path

Open the file and search for the text 'includeExceptionDetailInFaults', then set it to true.


Error (after turn on IncludeExceptionDetailInFaults)
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> 
   <s:Body> 
      <s:Fault> 
         <faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode>
         <faultstring xml:lang="en-GB">No matching MessageFilter was found for the given Message.</faultstring> 
         <detail> 
            <ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
               <HelpLink i:nil="true"/> 
               <InnerException i:nil="true"/> 
               <Message>No matching MessageFilter was found for the given Message.</Message> 
               <StackTrace>at System.ServiceModel.Routing.MessageRpc.RouteToSingleEndpoint[TContract](RoutingConfiguration routingConfig)
   at System.ServiceModel.Routing.ProcessRequestAsyncResult`1..ctor(RoutingService service, Message message, AsyncCallback callback, Object state)
   at System.ServiceModel.Routing.RoutingService.BeginProcessRequest[TContract](Message message, AsyncCallback callback, Object state)
   at System.ServiceModel.Routing.RoutingService.System.ServiceModel.Routing.IRequestReplyRouter.BeginProcessRequest(Message message, AsyncCallback callback, Object state)
   at AsyncInvokeBeginBeginProcessRequest(Object , Object[] , AsyncCallback , Object ) 
   at System.ServiceModel.Dispatcher.AsyncMethodInvoker.InvokeBegin(Object instance, Object[] inputs, AsyncCallback callback, Object state)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) 
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) 
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) 
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace> 
               <Type>System.InvalidOperationException</Type> 
            </ExceptionDetail> 
         </detail> 
      </s:Fault> 
   </s:Body> 
</s:Envelope>

Tuesday 14 May 2013

Document service / AIF ports deployment for Dynamics AX2012

Deploying AIF ports involve several steps, that's to export the ports data, import, and reactivate.
The steps below shows the process to deploy Inbound ports.

  1. Create AIF definition group
    - Login to source environment, go to path: System administration > Common > Data export/import > Definition groups
    - Create new definition group record, click "Clear" button to clear the other default options, click OK



    - Click "Select tables" and enter "AifInboundPort" in 'Name of table', check the checkbox for 'Apply criteria' & 'Specify related tables'
    (you may repeat all the steps with "AifOutboundPort" as the value in 'Name of table' for deploying Outbound ports)



    - Click "Select related tables".
    - Make sure the relationship level is 2, if it is not, then click on the "<<" or ">>" to adjust it.
    - Uncheck "BarcodeSetup" and "ExtCodeTable", then click "Select all remaining levels".



    - After "Select all remaining levels" is clicked, additional tables will be selected.



    - Summary showing more tables are selected.



    - If you wanted to export only some of the Ports, then click "Export criteria".
    - Create a filter on "Port name" field, then select the Ports that you wanted to export/deploy.



  2. Export AIF Inbound Ports
    - Using the definition group created above, export the data from source environment.

  3. Import AIF Inbound Ports
    - Login to destination environment, go to path: System administration > Common > Data export/import > Import.
    - Select the source file (exported in Step #2) and import (you may select Advanced > Update existing record if you’re updating).

  4. Deactivate the imported ports
    - After the import is completed, deactivate all the ports that you’ve just imported.
    - Path: System administration > Setup > Services and Application Integration Framework > Inbound Ports
    - Select the Port name and click on "Deactivate"



  5. Register services
    #Option 1
    Path: System administration > Setup > Checklists > Initialization checklist
    Expand the Initialize system node
    Click "Set up Application Integration Framework"

    #Option 2
    Path: AOT > Services > Right click on the services > Add-Ins > Register services
    *Do this for each of the services you need

  6. Update the ports configuration
    Update the configuration details for each of the imported port.
    Eg. Update the URI that were used in the source environment to URI that's based on paths in the destination environment.

  7. Reactivate each of the port imported earlier
    - Path: System administration > Setup > Services and Application Integration Framework > Inbound Ports > Activate
     
  8. Test the port
    Pick one of the port and go to its URI.

    Eg: http://<ServerName>:<PortNumber>/MicrosoftDynamicsAXAif60/TECAddressService/xppservice.svc?wsdl

    If it returns the correct XML format, it works OK.
    If it returns error such as "Handler "svc-Integrated" has a bad module "ManagedPipelineHandler" in its module list", then open Visual Studio 2010 command prompt and execute "aspnet_regiis.exe-i".





More details:

Monday 25 March 2013

Error - The number of joins in the statement is 28. This exceeds the maximum of 26. Turn on exception for this warning to see the call stack.

Table inheritance in AX 2012 is a nice feature, but it has to be used carefully due to the performance impact it might have. Putting the performance impact aside, this post is mainly focus on the error due to exceeded maximum table join, which is caused by Table inheritance and Replacement key.

The error message - "The number of joins in the statement is 28. This exceeds the maximum of 26. Turn on exception for this warning to see the call stack." (the 28 is due to the form has 28 table join and the 26 is a server settings for AOS, so these two numbers are not fixed, it depends on your form's datasource and server settings)

Brief info
- Forms\CustTable has an additional datasource. Eg. CustTableExtended
- CustTableExtended is InnerJoin to CustTable

A brief history of sample issue
While it is working OK the day before, the next day this error suddenly occur on Forms\CustTable. A further investigation found that the table join has increased due to a new field has been added to a table (Eg. CustTableExtended) which is InnerJoin with CustTable.

Cause of error
- The new table field on CustTableExtended has a relation to a derived/child table
- This derived/child table has a relation to the parent table
- On the parent table, it has a Replacement key.

When the CustTable form is opened, this additional field is joined to the child table, which is then joined to the parent table, this has caused an additional two table join, which happens to hit the limit of maximum table join.

Resolution
A. Consider redesign the solution

B. Remove Replacement key (usually won't choose this option due to presentable on form level is not user friendly - Eg. Showing RecId. See screenshot at the bottom of this post)

C. Increase the maximum table join (System administration > Setup > Server configuration > 'Performance optimization' tab > 'Performance settings' group > 'Maximum number of tables in join' field)




Simpler example
1. Current server settings: Maximum number of tables in join = 30

2. Tables\DemoBaseGroup
Parent table, has replacement key, SupportInheritance = Yes



3. Tables\DemoGroupA - Q (17 tables)
Derived/child table, extends DemoBaseGroup, SupportInheritance = Yes



4. Tables\DemoMainTable
Standalone table, , SupportInheritance = No, contain 17 fields (GroupA - Q), each field has a relation to its related table (DemoGroupA - Q) on RecId



5. Forms\DemoMainTable
Only 1 DataSource (DemoMainTable)



When the form is opened, it hit the maximum tables join error.
Given there's only 1 table in the DataSource, this error would first appears to be weird, but once you know field(s) with relation to inherited table which has Replacement key will cause an auto table join to the related tables, then it will make sense.



Below are the query generated when the form is run.
Two table join is created for each field with relation to inherited table with Replacement key.
Eg. 17 fields in the table will cause 34 table joins.


SELECT * 
FROM  DEMOMAINTABLE T1 
LEFT OUTER JOIN (DEMOBASEGROUP T2 INNER JOIN DEMOGROUPA T3 ON ((T3.DATAAREAID=?) AND (T3.RECID=T2.RECID))) ON ((T2.DATAAREAID=?) AND (T1.GROUPA=T3.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T4 INNER JOIN DEMOGROUPB T5 ON ((T5.DATAAREAID=?) AND (T5.RECID=T4.RECID))) ON ((T4.DATAAREAID=?) AND (T1.GROUPB=T5.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T6 INNER JOIN DEMOGROUPC T7 ON ((T7.DATAAREAID=?) AND (T7.RECID=T6.RECID))) ON ((T6.DATAAREAID=?) AND (T1.GROUPC=T7.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T8 INNER JOIN DEMOGROUPD T9 ON ((T9.DATAAREAID=?) AND (T9.RECID=T8.RECID))) ON ((T8.DATAAREAID=?) AND (T1.GROUPD=T9.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T10 INNER JOIN DEMOGROUPE T11 ON ((T11.DATAAREAID=?) AND (T11.RECID=T10.RECID))) ON ((T10.DATAAREAID=?) AND (T1.GROUPE=T11.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T12 INNER JOIN DEMOGROUPF T13 ON ((T13.DATAAREAID=?) AND (T13.RECID=T12.RECID))) ON ((T12.DATAAREAID=?) AND (T1.GROUPF=T13.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T14 INNER JOIN DEMOGROUPG T15 ON ((T15.DATAAREAID=?) AND (T15.RECID=T14.RECID))) ON ((T14.DATAAREAID=?) AND (T1.GROUPG=T15.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T16 INNER JOIN DEMOGROUPH T17 ON ((T17.DATAAREAID=?) AND (T17.RECID=T16.RECID))) ON ((T16.DATAAREAID=?) AND (T1.GROUPH=T17.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T18 INNER JOIN DEMOGROUPI T19 ON ((T19.DATAAREAID=?) AND (T19.RECID=T18.RECID))) ON ((T18.DATAAREAID=?) AND (T1.GROUPI=T19.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T20 INNER JOIN DEMOGROUPJ T21 ON ((T21.DATAAREAID=?) AND (T21.RECID=T20.RECID))) ON ((T20.DATAAREAID=?) AND (T1.GROUPJ=T21.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T22 INNER JOIN DEMOGROUPK T23 ON ((T23.DATAAREAID=?) AND (T23.RECID=T22.RECID))) ON ((T22.DATAAREAID=?) AND (T1.GROUPK=T23.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T24 INNER JOIN DEMOGROUPL T25 ON ((T25.DATAAREAID=?) AND (T25.RECID=T24.RECID))) ON ((T24.DATAAREAID=?) AND (T1.GROUPL=T25.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T26 INNER JOIN DEMOGROUPM T27 ON ((T27.DATAAREAID=?) AND (T27.RECID=T26.RECID))) ON ((T26.DATAAREAID=?) AND (T1.GROUPM=T27.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T28 INNER JOIN DEMOGROUPN T29 ON ((T29.DATAAREAID=?) AND (T29.RECID=T28.RECID))) ON ((T28.DATAAREAID=?) AND (T1.GROUPN=T29.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T30 INNER JOIN DEMOGROUPO T31 ON ((T31.DATAAREAID=?) AND (T31.RECID=T30.RECID))) ON ((T30.DATAAREAID=?) AND (T1.GROUPO=T31.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T32 INNER JOIN DEMOGROUPP T33 ON ((T33.DATAAREAID=?) AND (T33.RECID=T32.RECID))) ON ((T32.DATAAREAID=?) AND (T1.GROUPP=T33.RECID)) 
LEFT OUTER JOIN (DEMOBASEGROUP T34 INNER JOIN DEMOGROUPQ T35 ON ((T35.DATAAREAID=?) AND (T35.RECID=T34.RECID))) ON ((T34.DATAAREAID=?) AND (T1.GROUPQ=T35.RECID)) 
WHERE (T1.DATAAREAID=?) ORDER BY T1.RECID OPTION(FAST 5)

By removing the Replacement key, the error is gone and the query only has one table, but the form will show the RecId value itself only, which appears to be not user friendly/non-readable. So this usually won't be the solution. The best to do is either redesign the solution or increase the maximum table join.



One might think, why design a table with so many fields with relation to separate inherited tables? Bear in mind the demo above is just to show how the error occur, it wasn't a real life example, but on CustTable, that could easily be the real life example due to the massive table join in standard AX. 

The 'DirPartyPostalAddressView' in Forms\CustTable itself already has many table, together with other datasource, that's more than 10, if the form is further developed/customized (Eg. added one or two custom table and those table each has two or three field relation to inherited tables with Replacement key) then it would be easy to reach the limit.

Thursday 21 March 2013

Debug service operation in Dynamics AX 2012

Debugging standard X++ code is quite straight forward, open the code, set a breakpoint, run and debug.
But debugging X++ code running in CIL is different, it requires more work.

Service operation in Dynamics AX 2012 runs in CIL, you'll need to debug them from Visual Studio.

1. Open Visual Studio

2. Show the Application Explorer (View > Application Explorer)

3. Browse to the code you wanted to debug (Eg. the service operation)

4. Set a breakpoint

5. Attach the Visual Studio debugger to the Dynamics AX server process (Ax32Serv.exe)
    (Debug > Attach to process ...)

6. Click on the "Select" button and choose "Managed (v4.0) and click "OK"

7. Select the Ax32Serv.exe and click "Attach"
    (If you can't see this process, check the checkbox 'Show processes from all users')

8. Run the service operation process and when it reach the breakpoint, it will stop at the code in Visual Studio, you can then debug from there.


Setting breakpoint in Indo.add() or when Exception occur
In AX, one of the common technique to debug error is to put a breakpoint in Info.add(), this technique applies to service operation debugging as well (browse to Info.add() in Application Explorer, open the code in Visual Studio and set the breakpoint).

Another option would be to check the option for Exception.
(Debug > Exceptions ... > Check the checkbox for 'Common Language Runtime Exceptions')

Dynamics AX 2012 CIL debugging ref: http://msdn.microsoft.com/en-gb/library/gg860898.aspx


Remote debugging
The debugging of CIL doesn't always have to be done from the AOS hosting machine itself, it can be done remotely as well.

1. At the AOS hosting machine, go to "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger\x64"

2. Run the "msvsmon.exe" and leave it running there

3. On the remote machine (Eg. your laptop), start up Visual studio, follows Step 2 - 8 above, with an additional step at Step 5 - At the 'Qualifier', click on the Browse and select the AOS hosting machine.


Load Symbols
When you step in the code/method, if you're prompted to locate the code, you'll need to load in the symbols.

1. Go to: Debug > Options & Settings ... > Debugging > Symbols
2. Add this folder to cache: "C:\Program Files\Microsoft Dynamics AX\60\Server\[DynamicsInstanceName]\bin\XppIL\source"

*Change the [DynamicsInstanceName] to your instance name

Tuesday 12 March 2013

Batch task doesn't run according to dependencies

During the testing of one of the batch job development, we occasionally encounter one weird problem, the batch job doesn't run according to the dependencies set on them (batch dependencies randomly not working).

We have a batch job, during runtime, it will create several batch tasks, among these task, some of them should run first and some of them will run concurrently, task dependencies are added during runtime.

We did a lot of testing, but occasionally when this happen, we have no idea what has cause it even though the job looks entirely alright, after spending some time on it, we raised a support call with MS Support, this issue has been reported before and it can be found at Partner Source support knowledge base.

Search for KB 2731538 or the subject line "Batch framework does not respect task dependencies in Microsoft Dynamics AX 2009 Service Pack 1", you'll need to download and apply the hotfix.

The screenshot below is showing the Task 3.1, has 3 dependencies, it should run after that dependent tasks are completed. But somehow, it disregard it, even though one of the Task 2 is still executing, Task 3.1 has start executing.


AIF - Object reference not set to an instance of an object

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <s:Fault>
         <faultcode>s:Client</faultcode>
         <faultstring xml:lang="en-GB">Object reference not set to an instance of an object.</faultstring>
      </s:Fault>
   </s:Body>
</s:Envelope>


There could be many reason for this error message, but this post is just to share the reason we hit this error.

Below are the details:
  • We have a document service for a query (a main datasource with 3 sub datasource)
  • At one of the sub datasource, among the field list, one of the field is causing the error shown above
  • If this field is removed from the query, it works fine
  • Further investigation found that this field has a property of Mandatory = Yes, EDT of RefRecId
  • In the respective table, there's a relation for this field linking to another table's RecId
    Eg: SubTable.FieldA == RelatedTable.RecId
  • RelatedTable is an inherited table
  • At the parent table for RelatedTable, is has a replacement key
This error only happen if this mandatory field is == 0.

We tried testing it against normal mandatory field (Eg. a text field), even if empty (not filled in), the error didn't occur, it only occur to field that's linked to another table (and when the above conditions are true)

Tuesday 19 February 2013

Dynamics AX AOS on "Dead" status

Just a simple quick post, one of the reason for AOS appearing as "Dead" on the "Online users" form could be the database is giving error (Eg. Database transaction log is full).

A good place to look at is the Event Log on the AOS, it should give you the error message indicating what happened there.