Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all 72043 articles
Browse latest View live

Dynamics AX 2012 R2 - Consuming TLS 1.2 only web service

$
0
0

Hello everyone,

I'm starting to go a little crazy after exhausting hours into a sudden issue I am having.

I am running Dynamics AX 2012 R2 (Version: 6.2.1000.9655) and I'm consuming a web service through a custom class which builds a SOAP envelope by hand and using HttpRequest.

The code has worked fine for years but the web service is making an upcoming change where they will only allow TLS 1.2 connections and everything else will be refused.

In preparation for this, access to a web service that ONLY accepts TLS 1.2 connections has been made available alongside the current production environment which still accepts TLS 1.0.

When consuming the current production environment, everything continues to work as expected, but once I change my endpoint to the TLS 1.2 environment, I am receiving this error message:

Method 'send' in COM object of class 'Microsoft.XMLHTTP' returned error code 0x800C0005 (<unknown>) which means: The system cannot locate the resource specified.

I opened Fiddler and reran the code in Dynamics AX and the error response changed to this (While Fiddler is open):

Method 'send' in COM object of class 'Microsoft.XMLHTTP' returned error code 0x800C0008 (<unknown>) which means: The download of the specified resource has failed.

Fiddler also shows this in the text view of the request:

Version: 3.1 (TLS/1.0)

With the following error:

fiddler.network.https> HTTPS handshake to webserviceURL (for #3) failed. System.IO.IOException Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. < An existing connection was forcibly closed by the remote host


I could be wrong, but I am taking this as the request is not being made with TLS 1.2 but I have done the following to try and correct this with no luck:

1. I've followed this URL https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/(.NET)_Enable_SSL_Protocols_for_your_Integrations_-_TLS_1.1_and_TLS_1.2 and added the requested registry keys to try and force .NET to TLS 1.2.

2. I've edited this line of the Ax32.Exe.Config file to at least specify a 4.5 version of .NET <supportedRuntime version="v4.0.30319" sku=".NETFramework,Version=v4.5.1"/>

3. I've added this line of code before I call the web service in X++ System.Net.ServicePointManager::set_SecurityProtocol(System.Net.SecurityProtocolType::Tls12);

Lastly, I have a few web applications (ASP.NET MVC) that run on a different server and I added this line of C# code - ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 to them and they appear to connect to the TLS 1.2 web service just fine.

Can anyone please offer me any assistance regarding AX on this issue?

Thank you so much!


negative values only

$
0
0

Hi all

i have a scenario in which i have to add check box in inventjournalname form and depending on the value of the check box i have to control the value of qty in inventjournalline field to negative only. how can i do that .....need help

Create Non PO pending vendor invoice using x++ in dynamics 365 for operations

$
0
0

Hello,

We are using D365FO U11.

I'm trying to import a Non PO pending vendor invoice( using procurement category) from excel using x++.

Could you please provide some inputs like tables/classes involved in this process?

Also i need to import Default dimensions Cost center and Business unit, since AxdDimensionUtil is deprecated how i can get DefaultDimension RecId to assign while importing?

"No entry points recorded" while using security development tool.

$
0
0

I'm new to this tool, The tool already installed in AX 2012 R3 Cu8 and CIL is generated.

When I try to start recording and do the operation and do a stop recording, I get the infolog message "No entry points recorded".

I have gone through few posts mentioning abount hot fix but since this is already AX 2012 R3 CU8, I believe the hot fix in.

language is En-US.

AX2012 Support Live

$
0
0

Hello Everyone, quick question....

I am thinking of upgrading to AX 2012R3 to from R2.....but the cost is a major issue

If I choose not to upgrade will I still be able to pay my annual license fee? let say after after 2019 and beyond?

I know one of the main thing is not getting MS mainstream and extended support for AX 2012R2 after 10/9/2018 and 10/12/2021 respectively.

What will happen to Ax 2012 after 2021? Will I be able to use the application? also how would i pay for the licensing? 

Thanks for your help...

Missing WSDL port on AOS configuration

$
0
0

Hi all,

I installed new AOS successfully, But when I open server configuration WSDL port is not there.

Also client is installing with error.

Thanks in advance.

Purpose of License Configuration Keys of "Inventory Dimensions"

$
0
0

does anyone know what is the purpose of the configuration keys labeled "Inventory Dimension 1" "Inventory Dimension 2" etc.?

Insert values using Macros

$
0
0

Hi people,

What I am trying to do in making an insert using values from a method in my class, but I have some problems with the parameters. The macro that I have done is something like this.

#LOCALMACRO.InsertGroupValues

%1.clear();

%1.ItemId = %2;

%1.insert()

#ENDMACRO

public void InsertMethod()

{

Table1  table1;

#InsertGroupValues(table1, "00001")

}

And, in the class method I send the table I want to insert in. The problem is, when I declare the macro, it shows me a syntax error, that means it is not possible to send the table as a parm and insert values in, or I have an error that I haven't seen.

Thank you.


KingswaySoft Azure AX destination entity integration error.

$
0
0

I have a FinancialDimensionValue entity in Azure Dynamics 365 and I am trying to insert data to that entity with data from sql server, even after mapping all the Key fields with either valid data or hardcoded data I am not able to insert any data into it. I keep getting the same below error

KingswaySoft.IntegrationToolkit.DynamicsAx.Odata.AxOdataServiceException: The remote server returned an error: (400) Bad Request. (Error Type / Reason: BadRequest, Detailed Message: {
  "error":{
    "code":"","message":"An error has occurred.","innererror":{
      "message":"Exception has been thrown by the target of an invocation.","type":"System.Reflection.TargetInvocationException","stacktrace":"   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)\r\n   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)\r\n   at Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataEntityDeserializer.ReadODataBodyAsType(HttpRequestMessage request, Type clrType)\r\n   at Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataEntityDeserializer.ReadODataBodyAsDelta(HttpRequestMessage request, Type clrType)\r\n   at Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataController.ReadBodyAsDelta(EntityType entityType)\r\n   at Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataController.Post()\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClassc.<GetExecutor>b__6(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeg

Can anyone help me how to deal with this error.

I am trying to integrate Azure with Dynamics 365 and migrate the data using SSIS.

I am not using  Azure Data factory or Service bus with KingswaySoft.

Passing a parameter to an SSRS report from Controller

$
0
0

Hi folks, I need to run a batch job that passing the customer account to the SSRS report Dynamically...and this will write a PDF file per customer.

So I believe I need to call the controller class something like this:

But not sure how to pass the parameter to the report.  The parameter is not in the contract class.  Can't I just pass the parameter to the report by modifying the query range rather than adding the parameter to the contract class?

Thank you in advance...

SrsReportRunController controller = new SrsReportRunController();
SRSPrintDestinationSettings printSettings;

// set report name
controller.parmReportName(ssrsReportStr(AMKcustsevenDayOpen, Report));

controller.parmArgs().parm('custaccount?');

// get print settings from contract
printSettings = controller.parmReportContract().parmPrintSettings();

// set print medium
printSettings.printMediumType(SRSPrintMediumType::File);
printSettings.fileFormat(SRSReportFileFormat::PDF);
printSettings.overwriteFile(true);
printSettings.fileName(@"C:\Temp\Report.pdf");

// suppress the parameter dialog
controller.parmShowDialog(true);

// start operation
controller.startOperation();

Unchecked Active field in RecPlanVersion Table

$
0
0

Hi guys,

Good day May ask if when does an active plan version becomes unchecked/inactive?. I have some confusions about this.

Thanks !

HTTPWebrequest

$
0
0

Hi all,

I need to send a csv file to a https site.  The instructions I have been given to talk to the https have cURL commands so I am trying to duplicate this.  I'm am trying to via httpwebrequest and httpWebReponse but I can't get it to work.  I have based it on the ftpwebrequest / response from Axaptapedia but the actual send of the binary data has caused an error. 

the cURL instuctions are:- 

curl --request POST \

--header 'Authorization: bearer tokenforauthorisation' \

--header 'Content-type: text/csv' \

--header 'Accept: text/plain' \

--data-binary @/myhome/salesdata-20160512.csv \

https://a_url_to_post_to/api

to emulate this I have used the following code (currently as a job) but I get an error 415 "unsupported Media Type" when I try to get the response - debugger error appears on line  = webreq.GetResponse();

Any pointers would be greatfully accepted as I'm running out of time to get this live.

Thanks

Paulina

private void SendToAPI_PT()
{
    System.Net.HttpWebRequest               webReq;
    System.Net.HttpWebResponse              webRes;

    System.Exception    ex,webexception;
  
    CLRObject                               clrObj,httpresponse;
    System.IO.Stream                        stream;
    InteropPermission                       permission;
    System.IO.StreamReader                  streamRead;
    System.IO.StreamWriter                  streamWrite;
    System.Net.ServicePoint                 servicePt;
    System.Text.Encoding                    utf8;
    System.String                           filecontents;
    System.IO.StreamReader                  reader;
    System.Byte[]                           bytes;

    FilePath                                file;
  
    System.Net.WebHeaderCollection headers = new System.Net.WebHeaderCollection();
   

    System.Net.Authorization   bearer      = new System.Net.Authorization('Log_access_code');
    file =                          @"C:\users\paulina\salesdata_blank.csv";
    // Read file
    reader = new System.IO.StreamReader(file);   
    utf8 = System.Text.Encoding::get_UTF8();
    bytes = utf8.GetBytes( reader.ReadToEnd() );
    reader.Close();

        //This line gives the user control to run unmanaged and managed code
    new InteropPermission(InteropKind::ClrInterop).assert();
        // Create Object for adding headers
    headers = new System.Net.WebHeaderCollection();

    clrObj = System.Net.WebRequest::Create('https://a_url_to_post_to/api');
    webReq = clrObj;
        //Set Method Type
    webReq.set_Method('POST');
    webReq.set_KeepAlive(true);

        // Set Content type
    webReq.set_ContentType('text/csv');
    webReq.set_Accept('text/plain');
    webReq.set_ContentLength(bytes.get_Length());
  
        // Add Authorization code

    headers.Add('Authorization: bearer tokenforauthorisation');


            //Add header to request
    webReq.set_Headers(headers);
        //Get Service Point
    servicePt = webReq.get_ServicePoint();
    servicePt.set_Expect100Continue(false);
        //Gets the response object

    try
    {  
       // calling [Begin]GetRequestStream before [Begin]GetResponse.

        Stream = webreq.GetRequestStream();
        Stream.Write(bytes,0,bytes.get_Length());
        Stream.Close();
  
       
        webres = webreq.GetResponse();
        info(webres.get_StatusDescription());
        webRes.Close();
    }
    catch (Exception::CLRError)
    {
        ex = CLRInterop::getLastException();


        info(ex.ToString());
        if (ex != null)
        {
            ex = ex.get_InnerException();
            if ((ex != null) && (ex is System.Net.WebException))
            {
                webException = ex as System.Net.WebException;
                info(webexception.ToString());

            }
        }


    }

}

AX2012 - Budget Control

$
0
0

Guys,

I have the problem below, wonder if anyone can help.

My scenario

1/1/18 - i registered a budget for ledger account 600155 @ 100/ month from Jan - Dec.

At the beginning i just register the budget amount 100 but without the budget control and have some transaction posted from Jan - March'18

But from April'18 onward, i decided to setup the budget control for the ledger account 600150 to ensure not allow exceeded 100.

I notice that after i have activated the budget control for 600150, although i have registered 100 for month April at the beginning stage, but when i key in a actual transaction 80 (below budget) system will block me from posting the transaction.

Below is my error message

Wonder any solution for this?

Net amount amount not shown in PO

$
0
0

List of line numbers 30 Net amount Amount not shown I do not know what happened to the episode, but Confirmed when it was released. Check it out. How to fix (Details as shown below)

A Control with a name "Now" already exist on the form

$
0
0

Dear all,

I am creating Report in Microsoft Dynamics 365 following by instruction here,

After creating  report, i create a menu item an assign that report to menu item.

When i call report from menu item, this error appear.

Please tell me what happened and how i can solve it?

Many thank.


DefaultDimensionView does not return Dimension values that got created from UI

$
0
0

Hello,

I created a Dimension Attribute 'Product Category' from GL-> Chart Of accounts -> Dimensions->Financial Dimension 

and I added few dimension values for it by clicking  'Dimension Value' button at the top.

When i run the view DEFAULTDIMENSIONVIEW , it doesn't return this new dimension values I added.

I found the root cause that the table DIMENSIONATTRIBUTEVALUESETITEM does not contain the dimension value I added and hence the problem.

But I don't know why this is happening in the first place. What am I missing here? There are no any customizations around it.

Can someone please help to understand this problem?

Barcode Field

$
0
0

Hi All Expertise,

is there any ways to extract all the forms that is using Barcode field?

lookup InventJournalTrans

$
0
0

Hi All

I want to create lookup InventJournalTrans (ItemId) based on Family group (InventTable > FamilyGroup)

Regards,

Nana

AX Upgrade procedure

$
0
0

dear expert,

currently i'm using AX 2012 R2, with below version (RTM)

We plan to do upgrade to new version, my question is

1.  can I directly upgrade from R2 to R3 (CU 16) ? or must upgrade to same version which is R2 ?

2.  during upgrade, what should i do with my data ?can i continue with current data or must do cut over to new version ?

need advice from you guys.

Post FA via PO Invoice (Current posting layer and Tax posting layer) D365

$
0
0

Dear all,

I faced the error below when trying to post PO invoice for Fixed asset:

"Reference: VNSC-000002 Item: FA001 Account for transaction type Acquisition, book 200%Reduce, does not exist for fixed asset F-Oper000000002."

I could post the acquisition entries for both Tax and current layer via FA journal, but have issue when post FA via PO invoice.

Please advice me this case.

Best regards,

Thu Ngo,

Viewing all 72043 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>