Saturday 28 February 2015

Error while setting server report parameters. Error message: The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (rsRuntimeErrorInExpression) - In Ax 2012

Error :

Error while setting server report parameters. Error message: The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (rsRuntimeErrorInExpression)

Solution :


C:\Program Files\Microsoft SQL Server\MSRS11.TEST\Reporting Services\ReportServer

open "rssrvpolicy" in NotePad

and go to

<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="Execution" Name="Report_Expressions_Default_Permissions" Description="This code group grants default permissions for code in report expressions and Code element. ">


and paste the below code and save.


<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="Report_Expressions_Default_Permissions" Description="This code group grants default permissions for code in report expressions and Code element. ">




Thats It..



@Rahul Talasila

Sunday 22 February 2015

A call to the Microsoft Dynamics AX SRSFrameworkService service failed. The target principal name is incorrect.

Issue :

A call to the Microsoft Dynamics AX SRSFrameworkService service failed. The target principal name is incorrect.



Solution :


Steps to resolve the issue
1.Generate full IL

open AOT and register the following services:
->SRSFrameworkService
->SSASFrameworkService


Go to Services Group node and auto deploy the following service groups:
BIServices
UserSessionService




That's It..



@Rahul Talasila

Saturday 14 February 2015

No running server is assigned to the Upgrade batch group: Data Update - Ax 2012

Hello Guys...!

Issue :

No running server is assigned to the Upgrade batch group: Data Update


Reason : Batch Server is not assigned to the AOS

Solution :   Go to system Administrator ->setup->system->server configuration and select the AOS and enable "Is Batch Server"



@Rahul Talasila

Friday 13 February 2015

Insufficient inventory transactions with status received Error - Ax 2012

Hello Guys..

Issue : 
while doing po-invoice some times we get error "Insufficient inventory transactions with status received"


Reason: 


If we cancel product receipt and later we are doing invoice then we will face this issue. 


Solution : 


Microsoft has released hot fix for this(DynamicsAX2012R2-KB2957406). Click on the below link and install the hot fix to solve this issue.




Note : This will work for new Purchase orders not for existing purchase orders

Sunday 1 February 2015

Multiple PDC(Post Dated Cheques) Settlement In Ax 2012

Hello guys,

Problem :

In Ax 2012 R2 we don't have functionality to post multiple PDC's at one go

Solution :

We need a simple customization to enable this functionality

Steps :

-> Go to AOT->Forms-> VendPostDatedChecks->Designs->ActionPaneTab->SettleClearingTransaction

-> open properties of "SettleClearingTransaction" and change property "Multiselect" to "Yes"
-> In form design Go to ListPageGrid properties and change "Autodeclaration" to "Yes"
-> copy and paste the below code in Click method in "SettleClearingTransaction" button.


void clicked()
{
    //NS - Added by Rahul for multiselect posting option
    boolean multiSelected;
    CustVendPDCRegister _custVendPDCRegister,custVendPDCloc;
    super();
    if(CustVendPDC_ds.anyMarked())
    {
        _custVendPDCRegister = CustVendPDC_ds.getFirst(true);
        while(_custVendPDCRegister)
        {
            custVendPDCloc =            CustVendPDCRegister::findByReference(_custVendPDCRegister.LedgerJournalTrans);
            if(custVendPDCloc.PDCStatus == PostDatedCheckStatus::Posted)
            {
                CustVendPDCManager::settleClearingTransactions(custVendPDCloc);
                multiSelected = true;
            }
            _custVendPDCRegister = CustVendPDC_ds.getNext();
        }

    }
    if (multiSelected)
    {
        CustVendPDC_ds.research();
        CustVendPDC_ds.first();
        CustVendPDC_ds.mark(0);
        ListPageGrid.setFocus();
    }
    else
    {
        CustVendPDC_ds.reread();
        CustVendPDC_ds.active();
    }
        //NE - Added by Rahul for multiselect posting option
}


@Rahul Talasila






Function DimensionValidation::validateByTree has been incorrectly called In Axapta 2012

Error : Function DimensionValidation::validateByTree has been incorrectly called.

Reason :
This error is coming because we are passing the account and offset account in wrong manner to LedgerJournalTrans . The field OffsetLedgerDimension and Ledger Dimension are of type :
DimensionDynamicAccount , so before passing the Account to these field , we need to convert the account to correct type .


 How to do it:
For non ledger account(Bank, customer ....) , we do have the API :
DimensionStorage::getDynamicAccount(A/cNo ,LedgerJournalACType::Bank);

we need to pass record as :

LedgerJournalTrans .LedgerDimension  = DimensionStorage::getDynamicAccount(Hedging_table.AccountID,LedgerJournalACType::Bank);


But what to do with Ledger Account , you still can not pass these account directly as well .

Well there is one more API which can help us :

LedgerJournalTrans .getLedgerDimensionForLedgerType(Ledger A/c,jourTrans.Company); 

we need to pass record as :

LedgerJournalTrans .LedgerDimension  =  
LedgerJournalTrans .getLedgerDimensionForLedgerType(Ledger A/c,jourTrans.Company);


@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...