Skip to main content

Event log error of soap web service in axapta to D365FO

 ComponentName CustomServices 

  exceptionMessage Microsoft.Dynamics.Framework.Services.Compiler.Soap.SoapServiceCompileException: Code compile failed. c:\Users\Admin58d4b701fe\AppData\Local\Temp\8af9311e31a44d709460cea11e26d22d\qadynl2j.0.cs(32,64) : error CS0101: The namespace 'Dynamics.AX.Application.Services.WLKSalesLineService' already contains a definition for 'WLKSalesLineService' at Microsoft.Dynamics.Framework.Services.Compiler.Soap.SoapServiceCompiler.CompileCode(SoapServiceCompileContext context) at Microsoft.Dynamics.Framework.Services.Compiler.Soap.SoapServiceCompiler.CompileService(String serviceGroupName, SoapServiceCompileContext context) at Microsoft.Dynamics.Framework.Services.Hosting.Soap.SoapXppServiceRoute.GetHostingInfo(String serviceGroupName) 

  infoMessage Exception while setting up the hosting info. 


Please comment your suggestion .


I'm getting this error in event log for one service:

error CS1503: Argument 1: cannot convert from 'Dynamics.AX.Application.WLKCustVendStatusContract' to 'Microsoft.Dynamics.Ax.Xpp.Set'



[

    SysEntryPointAttribute(true),

    AifCollectionTypeAttribute("_accountNum",Types::String),

    AifCollectionTypeAttribute("return",Types::Class, classStr(WLKCustVendStatusContract))

]

public WLKCustVendStatusContract VendorStatus(AccountNum     _accountNum)

{

    VendTable                   VendTable;

    WLKCustVendStatusContract   ret;

    VendTable = VendTable::find(_accountNum);


    if(VendTable)

    {

        ret = new WLKCustVendStatusContract();

        ret.parmCreditLimit(0);

        ret.parmCustVendorBlocked(VendTable.Blocked);

    }

    else

    {

        ret = null;

    }


    return ret;

}


if i add this method in service then getting error

Popular posts from this blog

sales order Totals option getting error in Axapta

Problem: On  click sales order Totals option getting below error. Please help me how to solve it. Microsoft.Dynamics.Ax.Xpp.ClrErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ClrErrorException' was thrown. at Microsoft.Dynamics.Ax.Xpp.CLRInterop.MakeReflectionCall(Object instance, String methodName, Object[] parameters) at Dynamics.Ax.Application.TaxDocumentProxy.Sumbytaxaccountingprovider(TaxAccountingProvider taxAccountingProvider, TaxAcctPostingProfDistributionSide postingSide, String taxType, String taxComponent, Boolean , Boolean , Boolean ) in TaxDocumentProxy.sumByTaxAccountingProvider.xpp:line 15 at Dynamics.Ax.Application.TaxDocumentProxy.@Sumbytaxaccountingprovider(TaxAccountingProvider taxAccountingProvider, TaxAcctPostingProfDistributionSide postingSide, String _taxType, Boolean , Boolean ) at Dynamics.Ax.Application.TaxDocumentProxy.@Sumbytaxaccountingprovider(TaxAccountingProvider taxAccountingProvider, TaxAcctPostingProfDistributionSide postingSide, ...

X++ Code to run SSRS Report with parameter in D365 F&O (Example Sales Invoice )

Below is sample X++ Code to run SSRS Report with parameter in D365 F&O (Example Sales Invoice )      Args                       args = new Args();     CustInvoiceJour            custInvoiceJour;     SalesInvoiceJournalPrint   salesInvoiceJournalPrint;       select firstonly custInvoiceJour where custInvoiceJour.SalesId != '';       // Add record to be printed.     // In order to have the context table we need to set args.record().     args.record(custInvoiceJour);       salesInvoiceController = new SalesInvoiceController();     salesInvoiceController.parmReportName(         PrintMgmtDocType::construct(PrintMgmtDocumentType::SalesOrderInvoice).getDefaultReportFormat());       salesInvoiceContract = salesInvoiceController.parmReportContrac...