‏إظهار الرسائل ذات التسميات Dynamics AX 2012. إظهار كافة الرسائل
‏إظهار الرسائل ذات التسميات Dynamics AX 2012. إظهار كافة الرسائل

السبت، 15 أكتوبر 2016

AX 2012: cil generation the given key was not present in the dictionary

When i try to generate incremental CIL i face this error
"cil generation the given key was not present in the dictionary"


To fix this error you should check the CIL log file, it is located at "C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL\Dynamics.Ax.Application.dll.log"

Here you will find the AOT object for which the CIL generator found the error. Compile that object, fix the error and then regenerate the IL. 

Before generating IL it is good practise to make sure that there are no compilation errors in the code.

الأربعاء، 20 يناير 2016

AX 2012: Using X++ Get the NumberSeq and Voucher for LedgerJournalTrans Table


LedgerJournalNameId     journalName = "VENPM";
NumberSeq numberseq;

numberseq  =  NumberSeq::newGetVoucherFromId((LedgerJournalName::find(journalName ).NumberSequenceTable));

ledgerJournalTrans.Voucher = numberseq.voucher();

الاثنين، 5 يناير 2015

AX2012:Assembly xxxxx containing type is not referenced

assembly works in job but not with the sysoperationFW.
Solution: 
 - Copy ddl to the "Program Files\Microsoft Dynamics AX\60\Sever\[Your AOS Name]\bin\VSassemblies" folder
 - Added the AOS account to the dll file.
- Restarted AOS.

الخميس، 18 ديسمبر 2014

AIF Sales Order Create - SalesType being set to Journal

This is happening because, when we create a new Sales order using AIFservice, TheMaine Sales Order class checksis this the first sales order given by the customer, if so, then it put its order type = Sales Order but if the sales order is for a second or more time from the same customer than it put its order type= Journal. It checks all this with the help of PurchOrderFormNum field which is mandatory for creating sales orders from AIF. So the solution for it is to comment some code.
for that you need to go AOT-->Classes-->AxdSalesOrder-->prepareSalesTable() method and comment following code.
if (!_axSalesTable.salesTable())
    {
        createRecord = true;
        _axSalesTable.parmSalesType(this.salesType());


        select firstonly RecId from localSalesTable
            where localSalesTable.CustAccount       == _axSalesTable.parmCustAccount()
               && localSalesTable.PurchOrderFormNum == _axSalesTable.parmPurchOrderFormNum()
               && localSalesTable.SalesId           != _axSalesTable.parmSalesId();



      //  if (localSalesTable.RecId)
       // {
       //     _axSalesTable.parmSalesType(SalesType::Journal);
       // }
.
.
.
    }

Then, update service . Redeploy it and use it in your C# program. It will solve your problem.
//************************************** And Then *********************************************
To work around this problem, change the code in the first line after the hanging semicolon of the \Classes\AxdSalesOrder\prepareSalesTable object as follows.
Existing code
_axSalesTable.parmSalesType(this.salesType());

Replacement code
    if(enum2int(_axSalesTable.parmSalesType()) == 3)
        _axSalesTable.parmSalesType(SalesType::Sales);
    else
        _axSalesTable.parmSalesType(this.salesType());
///******************************************************
set the sales order parameter to "Sales Order" under the following path :-
 Accounts receivable -> Setup -> Accounts receivable Parameters -> AIF -> Order Type

الأحد، 14 ديسمبر 2014

ax 2012 user is not authorized for this port

ItemServiceClient Service = new ItemServiceClient()
 //********* Add the following to your code *********
Service.ClientCredentials.Windows.ClientCredential.Domain = "domain";
Service.ClientCredentials.Windows.ClientCredential.UserName = "username";
Service.ClientCredentials.Windows.ClientCredential.Password = "password";
Service.Open();
.
.
.
.
 CallContext ctx = new CallContext() { Company = "dat" };
  ctx.MessageId = Guid.NewGuid().ToString();
  ctx.LogonAsUser = String.Format(@"domain\username");

الأربعاء، 28 مايو 2014

Error message when you try to start a server that is running the AOS service in Microsoft Dynamics AX 2012 "Windows could not start the Dynamics Server$01 on Local Computer"

-In SQL in the newly restored database go to Security > Users.  Right-click on Users and choose new user.  Add the user account that runs the AOS service.  For me, this is my domain account.  
-In the middle of this user form, under Owned Schemas mark db_owner
-Still in the same form where you added the user, under Database role membership mark db_datareader, db_datawriter, and db_owner.
-In SQL in the newly restored database go to Programmability > Stored Procedures and right-click on CreateServerSessions and choose Properties.
-Click Permissions and click the Search button.  Find the account you just added to the database as a user, for me this is my domain account.
-In the bottom of this form under the Grant column mark all of the choices.
-In SQL in the newly restored database go to Programmability > Stored Procedures and right-click on CreateUserSessions and choose Properties.
-Click Permissions and click the Search button.  Find the account you just added to the database as a user, for me this is my domain account.
-In the bottom of this form under the Grant column mark all of the choices.



الاثنين، 26 مايو 2014

The deployment web site was not found for port: ScribeAxWebService - The port 'ScribeAxWebService' could not be deployed

The port 'ScribeAxWebService' could not be deployed.\nError:  Access to the path '\\TEASTING\MicrosoftDynamicsAXAif60\ScribeAxWebService' is denied.

The deployment web site was not found for port: ScribeAxWebService
The port 'ScribeAxWebService' could not be deployed.\nError: The deployment web site was not found for port: ScribeAxWebService



////****************** solution

Make sure IIS is running.

URL under addresses should look like https://localhost/MicrosoftDynamicsAXAif60/[your port name]/xppservice.svc

Virtual directory share path under web sites must match: C:\Program Files\Microsoft Dynamics AX\60\AifWebServices

URL under web sites must match https://localhost/MicrosoftDynamicsAXAif60