Thursday, July 23, 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, July 21, 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, July 20, 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, July 11, 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


 

Sunday, June 28, 2015

ERROR IN INVENTORY RECALCULATION "Account Number for transaction type Inventory, inventory receipt does not exist" - Ax 2012

Hello Guys..!

While doing inventory closing got below error

 "Account Number for transaction type Inventory, inventory receipt does not exist"


Reason :

I have given all accounts in posting profiles , but still same problem. Finally I found that offset ledger dimension value is missing in "InventTransPosting" table.

Solution :

By updating offset ledger dimension value in InventTransPosting Table.

Copy and Paste below code in AOT->Jobs and then run the job.

Note : Change from and todate in the below job according to your requirement

Example : If you are doing inventory closing from 1 JAN 2015 to 28 Feb 2015 .
                 Give same dates in below job.


static void UpdateInventTransPosting(Args _args)
{
    InventTransPosting                      inventTransPosting;
    GeneralJournalEntry                     generalJournalEntry;
    GeneralJournalAccountEntry              generalJournalAccountEntry;
    SubledgerVoucherGeneralJournalEntry     subledgerVoucherGeneralJournalEntry;
    TransDate                               frmDt = mkDate(04,05,2015);// Need to change
    TransDate                               toDt = mkDate(15,05,2015);// Need to change
    ;
    startLengthyOperation();
    ttsBegin;
    while select inventTransPosting where inventTransPosting.TransDate <= frmDt && inventTransPosting.TransDate >= toDt
        && inventTransPosting.OffsetLedgerDimension
        && inventTransPosting.InventTransPostingType == InventTransPostingType::Financial
    {
        select LedgerDimension from generalJournalAccountEntry
        join RecId from generalJournalEntry
        where generalJournalEntry.RecId == generalJournalAccountEntry.GeneralJournalEntry
        && (generalJournalAccountEntry.PostingType == LedgerPostingType::InventLoss || generalJournalAccountEntry.PostingType == LedgerPostingType::InventProfit)
        join RecId from subledgerVoucherGeneralJournalEntry
        where subledgerVoucherGeneralJournalEntry.GeneralJournalEntry == generalJournalEntry.RecId
        && subledgerVoucherGeneralJournalEntry.Voucher == inventTransPosting.Voucher
        && subledgerVoucherGeneralJournalEntry.VoucherDataAreaId == inventTransPosting.dataAreaId
        && subledgerVoucherGeneralJournalEntry.AccountingDate == inventTransPosting.TransDate;
       if (generalJournalAccountEntry.LedgerDimension)
        {
            inventTransPosting.selectForUpdate(true);
            inventTransPosting.OffsetLedgerDimension = generalJournalAccountEntry.LedgerDimension;
            inventTransPosting.doUpdate();
        }
    }
    ttsCommit;
    info('Updation completed');
    endLengthyOperation();
}


That's It...!


@Rahul Talasila

Thursday, June 25, 2015

10.00 cannot be picked because only 0.00 is/are available from the inventory - Axapta 2012

Hello Guys..!

while posting product receipt I got below error

“ #### cannot be picked because only 0.00 is/are available from the inventory.”

Reason :

This happens when item quantity is reserved in purchase order line.

Solution :

Step 1 :

Step :2

Make "Reservation" field 0(Zero).




That's it...

@Rahul Talasila

What is the primary purpose of using a Solution in Microsoft Power Platform & ALM?

As organizations embrace low-code development with Microsoft Power Platform , it becomes essential to manage and govern apps, flows, and dat...