Wednesday, March 20, 2019

Update SQLDictionary table AX 2012

Use below sample queries to update SQLDICTIONARY table to resolve field id conflict in AX 2012.

select * from SQLDICTIONARY where TABLEID = 0

select * from SQLDICTIONARY where TABLEID = 0 and NAME = 'XYZ'

select * from SQLDICTIONARY where TABLEID = 0 and FIELDID = 0

update SQLDICTIONARY
set FIELDID = 0
where TABLEID = 0 and NAME = 'XYZ'

Thursday, March 14, 2019

AX 2012 report deployment error network path was not found

Error:
An error occurred: The network path was not found. If User Account Control (UAC) is enabled on the machine, close the application, and then click Run as Administrator


The deployment was aborted. You do not have privileges to deploy to server. For deployment, you must have administrator rights to the SQL Server Reporting Services (SSRS). Contact your administrator to deploy.

Solution 1 disable UAC
Change following registry key value from 1 to 0.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system 
EnableLUA 
REG_DWORD change value of this key from 1 to 0 to disable UAC

Solution 2
User does not have administrator rights on reporting services and/or on server where reporting services installed.

Solution 3
"Remote registry" services not running on reporting server.

Solution 4
In case of load balancing reporting services refer link - reference

Solution 5

In case you are deploying reports using PowerShell, use option SkipReportServerAdminCheck as below.

For All Reports : "Publish - AXReport -ReportName * -SkipReportServerAdminCheck"
For Single Report : "Publish -AXReport -ReportName CustTransList -SkipReportServerAdminCheck"

Solution 6
In case static IP is assigned to developer PC, remove default gateway & alternate  dns, can also help to solve this error.

Please let me know, if this helps you.
Also, comment if you have any other solution for the same.

Tuesday, March 12, 2019

Clear cache with code X++ Dynamics 365/AX 2012

Code below can be used to clear caches for Dynamics 365 for Operations as well as AX 2012.

In AX 2012, copy and past code below into Job to execute and clear cache.

In D365 create runnable class as below, set that class as startup object for the project, set that project as startup project for the solution and execute class.

class RunnableClassTest
{       
    /// <summary>
    /// Runs the class with the specified arguments.
    /// </summary>
    /// <param name = "_args">The specified arguments.</param>
    public static void main(Args _args)
    {
        xSession::removeAOC();
        SysTreeNode::refreshAll();
        SysFlushDictionary::main(null);
        SysFlushAOD::main(null);
        SysFlushData::main(null);
        //SysBPCheckAIFDataObject::flushCache(true); // only for AX 2012
        SysFlushReportServer::main(null);
        SysFlushSystemSequence::main(null);
        xSession::updateAOC();
        info("Executed.");
    }

}

Monday, March 11, 2019

Expression in query ranges example Dynamics 365/AX 2012


Override form lookup method along with OR condition in query range.

public void lookup(FormControl _formControl, str _filterStr)
{
    //super(_formControl, _filterStr);
    SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(InventLocation),_formControl);
    Query query = New Query();
    QueryBuildDataSource queryBuildDataSource = query.addDataSource(tableNum(InventLocation));
    QueryBuildRange queryBuildRange;
    ;

    sysTableLookup.addLookupfield(fieldNum(InventLocation, InventLocationId));
    sysTableLookup.addLookupfield(fieldNum(InventLocation, Name));
    sysTableLookup.addLookupfield(fieldNum(InventLocation, InventSiteId));

    queryBuildRange = queryBuildDataSource.addRange(fieldNum(InventLocation, RecId));
    queryBuildRange.value(strFmt('((InventLocationType == %1) || (InventLocationType == %2))',
                            any2int(InventLocationType::Standard),
                            any2int(InventLocationType::Transit)));
  
    sysTableLookup.parmQuery(query);
    sysTableLookup.performFormLookup();
}

Saturday, March 9, 2019

Dynamics 365 for Operations On-premise installation/Troubleshooting

I will keep updating this post with the helpful links for the installation and troubleshooting D365 for Operation on-premise version.

Install D365 On-Premise PU 12:
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/deployment/setup-deploy-on-premises-pu12

Redeploy on-premise environment: Failed status.
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/deployment/redeploy-on-prem

Setup Network Printer for On-Premise environment.
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/analytics/install-network-printer-onprem

Troubleshooting:
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/deployment/troubleshoot-on-prem



Errors and solutions while installing On-Premise D365 for Operations
ADFS Configuration error:
https://allaboutax.blogspot.com/2018/12/adfs-configuration-error-invalid-scope.html

Deploy AX 2012 R3 environment on Azure

AX 2012/Dynamics 365 operations Performance monitoring related links.

To troubleshoot performance of AX 2012 or Dynamics 365 operations, i am collecting some helpful links on this post.

I will keep updating this blogs as and when required accordingly.

Performance monitoring:

https://blogs.msdn.microsoft.com/axinthefield/ax-performance-monitor-101-setup-perfmon-for-continuous-monitoring-with-rolling-files/

Disk:
https://blogs.technet.microsoft.com/josebda/2014/10/13/diskspd-powershell-and-storage-performance-measuring-iops-throughput-and-latency-for-both-local-disks-and-smb-file-shares/

https://blogs.msdn.microsoft.com/axinthefield/assessing-your-disk-performance-and-your-needs-collecting-relevant-data-part-1/

https://blogs.msdn.microsoft.com/axinthefield/assessing-your-disk-performance-and-your-needs-analyzing-collected-data-part-2/

AX 2012

Performance dashboard
https://blogs.msdn.microsoft.com/axinthefield/3-powershell-scripts-for-dynamics-ax-refresh-report-and-monitor/

AX 2012 Forms performance
https://blogs.msdn.microsoft.com/axinthefield/how-to-measure-the-performance-of-the-dynamics-ax-2012-forms/

Client Access log: (how often they are accessing forms)
https://blogs.msdn.microsoft.com/axperf/2011/10/14/client-access-log-dynamics-ax-2012/

Friday, March 8, 2019

Try catch examples D365/AX 2012

   
Generic try catch example, which will give detailed information about error can be used in AX 2012 as well as D365 for operations.

     try
     {

     }
     catch (Exception::CLRError)
     {
            ex = ClrInterop::getLastException();
            if (ex != null)
            {
                ex = ex.get_InnerException();
                if (ex != null)
                {
                    error(ex.ToString());
                }
            }
    }
    catch (Exception::Error)
    {
        info(ppAutoInventRegister::getErrorStr());
    }
    

    public static server str getErrorStr()
    {
        SysInfologEnumerator enumerator;
        SysInfologMessageStruct msgStruct;
        Exception exception;
        str error;
        enumerator = SysInfologEnumerator::newData(infolog.cut());
        while (enumerator.moveNext())
        {
            msgStruct = new SysInfologMessageStruct(enumerator.currentMessage());
            exception = enumerator.currentException();
            error = strfmt("%1 %2", error, msgStruct.message());
        }
        return error;
    }

Happening

Upgrade from AX 2012 to Latest Dynamics 365 Finance and Operation

Below are the steps defined by sequence. 1. Create new Upgrade project in Dynamics LCS. 2. Create VSTS Project and connect it with L...

Trending now