question

ShalabhGupta-8457 avatar image
0 Votes"
ShalabhGupta-8457 asked ShalabhGupta-8457 answered

Pagination lost after converting DateTime to Date - BCS - External Content Type - SP Server 2010+

Hi All,

I followed the below post to convert my Datetime BCS OOB field to a Date field by updating the view from SP designer 2010 as suggested.

https://www.codeproject.com/Articles/744235/Formatting-Date-Number-Data-on-BCS-OOB-Business-Da?msg=5757451#xx5757451xx

I replaced existing field value from:
<xsl:value-of select="$thisNode/@[name()=current()/@Name]">
To
<xsl:value-of select="ddwrt:FormatDateTime($thisNode/@[name()=current()/@Name], 1033, 'MM/dd/yyyy')
">

Also followed this document to replace using a substring:
https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/gg271157(v=office.14)?redirectedfrom=MSDN#to-customize-the-date-column-of-an-external-list

In both these cases, my pagination capability to go over to the next page is getting lost. When I click on the next page, the list becomes empty.

I'd like to know if you have seen this behavior anytime during this implementation and if you have, is there a workaround to this problem?

Appreciate your inputs.

Regards,
Shalabh

office-exchange-server-administrationoffice-sharepoint-server-development
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Jerryzy avatar image
0 Votes"
Jerryzy answered

Hi @ShalabhGupta-8457,

I can reproduce this issue in my side in the external list, when do paging, the data will lost.

A workaround is to use Business Data List WebPart to display list data, convert datetime to date:

34919-busssha26.gif

Select external content type to display the data and then open the page where hosted the web part in SharePoint Designer, set date format:

34899-snipaste-2020-10-26-16-38-11.png

The paging will be working:

34900-snipaste-2020-10-26-16-38-50.png





If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ShalabhGupta-8457 avatar image
0 Votes"
ShalabhGupta-8457 answered

Hi @Jerryzy-MSFT

Thanks for your reply. I am glad you are able to reproduce this issue and were able to share a workaround with me

I'll go ahead and test it out to see if this works for us. Will keep you posted.

Thanks,
Shalabh

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ShalabhGupta-8457 avatar image
0 Votes"
ShalabhGupta-8457 answered

Hi @Jerryzy-MSFT,

I just tried that approach and it works well showing the records in the read-only format with updated date-time formatting.

This however, has impacted our ability to perform actions on the list records (CRUD operation) as shown below:
35113-image.png

Do you know if there is a way to bring back External-content-type default list item actions back on this business-data-list-webpart? We are mainly interested in EDIT/DELETE operations




image.png (3.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ShalabhGupta-8457 avatar image
0 Votes"
ShalabhGupta-8457 answered

Hi @Jerryzy-MSFT ,

Wanted to share a quick update on the above question. I was able to add an Onclick event to the row's ID column to open the Editview using SP.UI.ModalDialog.showModalDialog(options) and it worked. We can see Edit/Delete actions from this Modal window.

Closing this thread.. thanks a lot for your help!!

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.