Developer forum

Forum » Integration » Error in ICC with D365 BC

Error in ICC with D365 BC

Chris Søgaard
Chris Søgaard
Reply

Hi DW

We have an error on the Integration Customer Center on a client running BC18 on cloud.

We have updated the code unit to 1.2.0.13 and DW to 9.10.8.

After updating it seems that downloading files from the BC fails, when using e.g. “Download PDF” or “View invoice” options in the customer center.

We get this error:

“The remote server returned an error: (500) Internal Server Error. Response: You tried to invoke the Report object with the ID 50206 from the object DynamicwebCustomerCenter. An object with that ID does not exist in the current application.”

We are not 100% sure that this error came right after updating, but we have seen it work some weeks ago on the older version of BC and Code Unit. Could this be a bug?


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Chris,

I was trying to reproduce this issue using BC 18 docker sandbox and online cloud BC18 sandbox and it was working fine. Mine request was:

<GetPDFForItem type="OpenOrder" id="101001" externalUserID="10000"/>

What is your request?
Maybe you are requesting and order that doesn't exist or does not belong to the input customer from the externalUserID parameter?

Kind regards, Dmitrij

 
Chris Søgaard
Chris Søgaard
Reply

Hi Dmitriy

I hoped you were able to reproduce this.

But this is actually tested from the app "Integration Customer Center" that has been setup in backend, so it should not request orders that does not exist on the user. Using the test tool I get the same error. It seems that <GetList> and <GetItem> works but trying to get the PDF fails, please see my images from testing this in test tool:

Request <GetList type="OpenOrder" customerID="54883410"></GetList> returns a response like this:

Trying to get the details for this order using the GetList request <GetItem type="OpenOrder" customerID="54883410"  documentNO="603035"></GetItem> returns expected result for this specific order:

Trying to execute the "GetPDFForItem" request for getting the PDF file <GetPDFForItem type="OpenOrder" id="603035" externalUserID="54883410"/> will return the error from above

 
Chris Søgaard
Chris Søgaard
Reply

Hi again

Just writing a quick update on this one.

There seemed to be something weird going on either with the code unit or with the Integration Customer Center in DW 9.10.8.

After code unit was updated to version 1.2.0.14 we did not receive the error described at first from the test tool.

When using the test tool on the new version all related calls seemed to work fine, so at least this was a step forward:

  • GetList
  • GetItem
  • GetPDFForItem

But when navigating to the site’s ICC it did not work completely.

  • For the item type “Invoice” buttons “View invoice” and “Download PDF” both worked.
  • For the item type “OpenOrders” the button “View Invoice” triggering orderModal.ShowOrderModal('{orderID}') worked fine as well, but the button “Download PDF” did not work.
    • View invoice uses this URL for getting the data “/Admin/public/CustomerCenter/RequestExternalPdf.aspx?type=OpenOrder&id={orderID}”
    • Download PDF uses this URL for getting data “Admin/public/CustomerCenter/RequestExternalPdf.aspx?type=Order&id={orderID}&forceDownload=true”. The type requested is different and if I change “type=Order” to “type=OpenOrder” this works again.

This has been working at some point, so maybe “Order” had been converted to “OpenOrder” in a previous version. We have not changed any of the related .cshtml files nor upgraded Rapido, only updating the DW version.

I have updated this .cshtml file “Files\Templates\Designs\Rapido\eCom\IntegrationCustomerCenter\Orders.cshtml” replacing this line “Href = "/Admin/public/CustomerCenter/RequestExternalPdf.aspx?type=Order&id=" + orderId + "&forceDownload=true"” with this “Href = "/Admin/public/CustomerCenter/RequestExternalPdf.aspx?type=OpenOrder&id=" + orderId + "&forceDownload=true"” and this seems to do the trick.

BR Chris

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Chris,
thx for the update.
We will look on the template thing.
Regards, Dmitrij

 

You must be logged in to post in the forum