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

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,

Cluster index property in table in D365FO

$
0
0

Hi All,

Can you please let me know how Cluster Index is work in Table? Means how it will work in Database?

When to use exactly Cluster Index?

I mean to say shall I use both Primary and Cluster index both in Table at a time ?

Kindly give me an example.

Please give me more shed on this.

Thanks!

Purchase Receiving Performance Reporting

$
0
0

Hello

I wanna report Item Receiving performance for purchase order on WMS module. 

is there any function for get this report?

I think labour standarts designed for created and finished works.

Cast generic Object to class

$
0
0

I am currently trying to cast a generic object to a specific class, with no luck yet.

Here is the scenario. I am receiving a generic object, and need to convert it to a specific type of a class. I tried the below, but none is working. Any ideas on how to make this work would be greatly appreciated.

class speicificClass()
{
str parm1, parm2;

public str parm1(str _parm1 = parm1)
{
parm1 = _parm1
return parm1
}

public str parm2(str _parm2 = parm2)
{
parm2 = _parm2
return parm2
}
}

Object genericClass;

SpecificClass specificClass;


//method 1 - cast generic to specific
specificClass = genericClass as SpecificClass();

//method 2
specificClass = genericClass;



AIF - Access Denied: You do not have sufficient authorization to modify data in database.

$
0
0

Creating purchase requisitions through AIF I am getting the following error:

cannot select a record in Purchase pools (PurchPool).Access Denied: You do not have sufficient authorization to modify data in database. 

I have created a custom Privilege, duty and role to give invoke access for the custom service I have created for purchase requisitions creation. I was expecting the user access to table would flow from the actual primary role(assigned for user to access AX thru desktop client) that is assigned to user. I custom role would be giving access only to the custom AIF service method.

I am not getting any error when accessing the PurchReqTable, as the access rights are assigned from the users primary role (assigned for user to access AX thru desktop client).

the user is able to create Purchase Requisition from the AX client. also able to access the Purchase pools records from the Purchase Requisition form.

My question is, if the user is able to access the PurchPool table from the AX client, then they should have access even through the AIF service. is that correct? 

P.S: Purchase pool is a customised field in PurchReqTable.

BaseEnum in Form

$
0
0

Hi Community,

I have an BaseEnum "VehicleTyp" with the Elements "Car" (1) and "Truck" (2).

I have a Form "Rentals"

In that Form the EnumValue is not choosen, since I started the values with 1 and 2.

But I'd like to have a text in there, which say's "Choose" but without making a new Element.

I tried to override the initValue() in my rentalTable by saying "this.vehicleTyp = "Choose" ;  but that doesn't make sense at all... just wanted to Show that I am thinking on how I can get it fixed.

Any recommendations ?

Thanks in advance

Update duplicated row from InventBatch

$
0
0

Hello AX world,

I'm trying to apply a modification made for an InventBatch row to all row with same InventBatchId, please check picture below:

If i Modify the expDate of N°1LOT TEST1, then the new expDate will be modified for all others row where "InventBatchId == N°LOT TEST1"

Thanks in Advance,

Posted Purchase Order Invoice, Free text invoiced don't have voucher transaction

$
0
0

Dear all,

I faced strange issue: after posted Free text invoice and PO invoice, there is no voucher transaction created.

Does anyone know this case? Please advice me.

Thank and best regards,

Thu

FinancialDimension in separate grid in AX view

$
0
0

Hello All,

 I am going to create an AX view which will shows all GeneralJournal ledger Information. But I have one challenge that I need to show all financial dimensions in separate column.  For Example: I have LedgerDimension: 120001-BUX- CCX-DEPXX-CusXX

But I have to show in view like below-

Please help me on this how to do this.

Viewing all 73760 articles
Browse latest View live




Latest Images