DAXSPOT

Sunday, August 21, 2022

Error: The report server isn’t configured properly, SSRS report deployment error.

Error:

The service is not available.

The report server isn’t configured properly. Contact your system administrator to resolve the issue. 

System administrators: The report server can’t connect to its database because it doesn’t have permission to do so. 


Solution:

Use Reporting Services Configuration Manager to update the report server database credentials.

This issue "The report server can’t connect to its database because it doesn’t have permission" might occur if the account that the report server uses to connect to the report server database is:

  • Disabled or Locked.
  • Its password has changed recently.
  • It doesn't have owner permission on the Report Server databases (its permission has revoked).
  • This Report Server account can be one of the below types:
    • Windows domain user account.
    • SQL Server account.
    • The same service account that used to run the Power BI Report Server service.

And, you can find the current report server account login type at

Report Server Configuration Manager > Database > current report server database credential:

Update your current credential or add admin credential.

Thursday, August 18, 2022

Row Number or Serial Number for grid - SSRS Report expression

Below expression will give you the serial number to the grid:


=RunningValue(CountDistinct("YourTableName"),Count,"YourTableName")

or

=RowNumber(Nothing)

Thursday, August 11, 2022

Error - cannot create record in DMFEntity in D365FO.

Hello,

Sometimes after developing a entity, user face "record already exist in Entity" error. This can be solved by simply deleting all records in DMFEntity table.

Once you refresh entity list. you will get all the entities back.

Either you can run the below job or just go to the DMFEntity Table and delete that one selected record which is causing the error.

There are a lot of other related error:

Severity    Code    Description    Project    File    Line    Suppression State

Error        Infolog diagnostic message: 'Error synching entity metadata for entity - KRTProductEntity. Message -    at Microsoft.Dynamics.Ax.MSIL.Interop.throwException(Int32 ExceptionValue, interpret* ip)            0    

Error        at Dynamics.AX.Application.DmfDataPopulation.syncEntityUpdate(DMFEntity dmfEntity, DictDataEntity dictDataEntity)            0    

Error        at Dynamics.AX.Application.DMFEntity.insert() in xppSource://Source/ApplicationFoundation\AxTable_DMFEntity.xpp:line 433            0    

Error        Infolog diagnostic message: 'Cannot create a record in Entity (DMFEntity). Entity: Items, KRTProductStaging.            0    

Error        at Dynamics.AX.Application.DmfDataPopulation.syncEntityUpdate(DMFEntity dmfEntity, DictDataEntity dictDataEntity, Boolean useTargetEntityName, Boolean @useTargetEntityName_IsDefaultSet) in xppSource://Source/ApplicationFoundation\AxClass_DmfDataPopulation.xpp:line 947            0    

Error        at Dynamics.AX.Application.DmfDataPopulation.syncEntityMetadata(StringCollection dataEntityViewCollection, StringCollection compositeEntityList) in xppSource://Source/ApplicationFoundation\AxClass_DmfDataPopulation.xpp:line 794.' on category 'Error'.            0    

Error        at Dynamics.AX.Application.DmfDataPopulation.syncEntityCreate(DictDataEntity dictDataEntity, Boolean useTargetEntityName, Boolean @useTargetEntityName_IsDefaultSet) in xppSource://Source/ApplicationFoundation\AxClass_DmfDataPopulation.xpp:line 899            0    

Error        at Dynamics.AX.Application.DmfDataPopulation.syncEntityCreate(DictDataEntity dictDataEntity, Boolean useTargetEntityName)            0    

Error        at Microsoft.Dynamics.Ax.Xpp.Common.Insert()            0    

Error        at Microsoft.Dynamics.Ax.MSIL.cqlCursorIL.insert(IntPtr table)            0    

Error        at Microsoft.Dynamics.Ax.Xpp.NativeCommonImplementation.Insert()            0    

Error        Database synchronization failed. You may have to do a full build of the package 'K3Retail' and all of its dependent packages.            0    

Error        The record already exists.' on category 'Error'.            0    


JOB Sample:

class DeleteDMFEntity

{        

    public static void main(Args _args)

    {      

        DMFEntity dmfEntity;

        DMFTargetXML dmfTargetXML;

 

         //ttsbegin;

        delete_from dmfEntity;

        delete_from dmfTargetXML;

 

         /*while select forupdate dmfEntity

        {

            dmfEntity.delete();

        }*/

        //ttscommit;

        info('Done');

    }

}

Thursday, August 4, 2022

Get invent onHand as per site/warehouse or InventDimId itself, using x++ code.

Hello,

This post will help you to get invent onHand as per site/warehouse or InventDimId itself.


InventDim inventDim;

InventDimParm inventDimParm;

InventOnHand inventOnHand;

ItemId itemId;

InventDimId inventDimId;


itemId  = "XYZ";

inventDim.InventSiteId = "XYZ";

inventDim.InventLocationId = "XYZ";

inventDimParm.initFromInventDim(inventDim);

inventOnHand = InventOnhand::newParameters(itemId, inventDim, inventDimParm);

inventOnHand.availPhysical();

//or 

inventDimId = "XYZ";

inventDim = InventDim::find(inventDimId); //you can use as SalesLine.InventDimId

inventDimParm.initFromInventDim(inventDim);

inventOnHand = InventOnhand::newParameters(itemId, inventDim, inventDimParm);

inventOnHand.availPhysical();


Happy Daxing!

Wednesday, August 3, 2022

Department for the current user in X++ select statement

Hi All,

Below you will find a snippet to get department for the current user.


select OMOperatingUnit 

            join HcmPositionDetail

                where OMOperatingUnit.RecId == HcmPositionDetail.Department

            join HcmPosition 

                where HcmPositionDetail.Position == HcmPosition.RecId

            join HcmPositionWorkerAssignment

                where HcmPosition.RecId == HcmPositionWorkerAssignment.Position

            join HcmWorker 

                where HcmPositionWorkerAssignment.Worker == HcmWorker.RecId

            join DirPerson 

                where HcmWorker.Person == DirPerson.RecId

            join DirPersonUser 

                where DirPersonUser.PersonParty == DirPerson.RecId 

                && DirPersonUser.User == curUserId();

How to execute SQL directly form Dynamics AX X++

How to execute Sql directly form Dynamics AX X++ Reference by : alirazazaidi Dynamics Ax provide many other ways to communicate with databas...