Thursday 23 July 2015

How to get today's +1 date in Dynamics Axapta X++? Or How to get tomorow date in Dynamics Axapta X++?

Hello Guys..!

 How to get today's +1 date in Dynamics Axapta?

Solution

your date variable = DateTimeUtil::date(DateTimeUtil::addDays(DateTimeUtil::getSystemDateTime(), 1));




@Rahul Talasila

Tuesday 21 July 2015

"Unable to Log on to Microsoft Dynamics Ax" error message displayed while generating SSRS reports in Ax 2012

Hello Guys..!

Error :

"Unable to Log on to Microsoft Dynamics Ax" error message displayed while generating SSRS reports in Ax 2012


Reason:

BC Proxy(Business Connector )Account does not have proper permissions .

Solution :

Check Report server "Execution Account" . Give same account in system service account place.

Go To System administration->Setup-> system service accounts and  give the BC Execution Account .



@Rahul Talasila


 

Monday 20 July 2015

Make sure that SQL Server Reporting Services is configured correctly. Verify the Web Service URL and Report Manager URL configuration in the SQL Reporting Services Configuration Manager - AX 2012

Hello Guys..!

I’m trying to validate  report server setup of a client and got the error below

“Make sure that SQL Server Reporting Services is configured correctly. Verify the Web Service URL and Report Manager URL configuration in the SQL Reporting Services Configuration Manager.”


Solution :

UAC has to be turned off via registry by changing the DWORD “EnableLUA” from 1 to 0 in “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system”.

You will get a notification that a reboot is required. After the reboot, UAC is disabled.

After UAC is disabled, the issue is resolved.

Steps :

Start -> Regedit

Press Enter

Go to  -> “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system”

 Change “EnableLUA” 1 to 0





@Rahul Talasila

Saturday 11 July 2015

Error: Restore failed for Server 'ServerName\InstanceName'. System.Data.SqlClient.SqlError: Exclusive access could not be obtained because the database is in use.

Hello Guys..!

Some times while restoring Ax database we get below error.

Error: Restore failed for Server 'ServerName\InstanceName'.  System.Data.SqlClient.SqlError: Exclusive access could not be obtained because the database is in use. 


Reason : Ax Database is using by some service.

Solution : Kill all active connections which are using Ax database

Change the database name in the query and execute .

 
DECLARE @dbname NVARCHAR(128)
SET @dbname = 'DB name here'
 -- db to drop connections
DECLARE @processid INT
SELECT  @processid = MIN(spid)
FROM    master.dbo.sysprocesses
WHERE   dbid = DB_ID(@dbname)
WHILE @processid IS NOT NULL
    BEGIN
        EXEC ('KILL ' + @processid)
        SELECT  @processid = MIN(spid)
        FROM    master.dbo.sysprocesses
        WHERE   dbid = DB_ID(@dbname)
    END




That's It...


@Rahul Talasila


 

Adding a newline into a string in C# and X++

Below is the sample code we can use for  adding a newline after every occurrence of "@" symbol in the string in C#   using System...