0
votes

I have a list in SharePoint 2010 that has external items. It is easiest to explain the specific scenario. We have sales orders that have information that is being pulled from our MRP system. The unique key is the Sales order number. There are several columns in the list that do not come from MRP that show the status of the order on our production floor.

The way that it works now, every time a new sales order is created, the user must go to the SharePoint list, click new item, type in the SO number, click the check external item button and click ok which subsequently populates several fields in the list..... Then someone out on the floor populates the rest of the info

The part in bold is what I would like to automate. I understand it may need to be a stored procedure or some powershell script. The issue is, that because of the external content type in the list, all of the canned SharePoint tools wont allow me to feed data back into the list.

1

1 Answers

1
votes

One option is to create an SQL server trigger. This trigger would fire whenever a new sales order is created in your source database. You could make it a CLR trigger, and in the function make use of the SharePoint client interface.


After you provided a clearer description of the problem: I believe that you're looking for something like the list event handler. This will run on the events you care about, and you can pull from the database at the appropriate time.

Essentially, you need to make a Visual Studio SharePoint project (from my past experience this method requires you to use VS right on the SharePoint server, or else you have to copy a lot of DLLs manually from the server); and make an event receiver.