2

I have created a custom list with a field (column) of 'External Data' type, connected to my external content type. External Content Type's source is an SQL view. My problem is, when I make changes on the database, I would like the column in my sharepoint list to update as well, unfortunately this does not happen (well it does, when I click 'edit item' and 'save', but this would be a bit uncomfortable with a lot of data ;). Is it possible to get the data 'auto-refresh' on database change? I would appreciate any help.

2 Answers 2

0

There is a small icon above one of the external columns, that does a "business data refresh". So it will update all the rows that have new data in the database when you press that. With an external list, it refreshes the data every time you view the list, but with external columns, it updates the items when created or edited/saved, but otherwise caches the info. Pressing the refresh button might be a good solution depending on your users and application.

There doesn't seem to be an obvious way to do that programmatically (the page that gets called (BusinesssDataRefresh.aspx ,or something like that) doesn't show the details of what it is doing.

3
  • Also, I posted a question about automating BCS field loading, and a code sample was provided as an answer. You might want to look at that code sample to see if it helps you: How to Automate Entry of Ext Col Data in BCS
    – lwbecker2
    Commented Nov 20, 2011 at 14:58
  • Thanks for the reply, I was aware of the refresh button existance, which you and Verdan suggested, but I was actually unable to use it, eventually I chekced the error logs and found the solution to be changing the authentication type to BDC Identity in sql connection of ECT (as posted in the oldest comment here. I still have not tried to do it programatically after the change, but thje working button is sufficient at this moment for me
    – matt137
    Commented Nov 28, 2011 at 11:39
  • ok I have tested the code in link you provided and it really does the trick, thanks!
    – matt137
    Commented Nov 29, 2011 at 7:45
0

I consider this to be a feature and not some sort of bug. If one user picked some external data value it would be 'uncomfortable' for him/her to change that value without any notification. However I fully understood your requirement.

For external lists you have refresh button available.

For items with external data column I can think of only one solution. You can develop custom Timer Job and make it run periodically doing system updates of your items. This is not best practice because such timer job will use lots of resources for executing even on some smaller or medium size lists.

I am not aware of any other (hopefully better) solution.

1
  • since it would be scheduled for maybe 4 times a day it seams quite a resonable solution imo, but still I can't figure out what to do programatically to refresh the List. I have tried iterating through all the SPItems in the list and call Update() but this doesn't work
    – matt137
    Commented Sep 22, 2011 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.