1

I have a client who is looking to show a list of links on a SharePoint page. Complication is that the links need to be generated to be specific for a physical location. We have the physical location part figured out by passing IP address to a webservice and getting data for that IP address. We need to take that data and substitute variables in URLs to get the list of links.

My question is, I'm questioning the best approach for this. The SharePoint page is hosted in a SharePoint 2013 environment. Can I make a SharePoint app that creates a list to host the URL strings, then use javascript to call the webservice and substitute the variables in the URL strings? I also need to deploy this to several similar SharePoint sites.

I can also host the URL strings in a SQL server database and access via a webservice if that makes more sense. The end goal is just to have the links displayed on a page in SharePoint.

1 Answer 1

0

There are many way to do this. Based on my experience the easiest option is

  1. Store the data in SQL server (Or you can store the data in SP Lists itself.. in this case you can use JSOM API's)
  2. Create External Content Type and External Lists to Manage the data (CRUD Operations)
  3. Create a Visual WebPart using Server Side Object Model and query the BCS connection
  4. Form the URL based on the data returned

If you are against SSOM then you can create a webservice layer which give you the data in desired format (HTML). Make sure the webservice is deployed into SharePoint server this way you will not face problems with Cross-Domain calls.

Now you can use a Content Editor Webpart and use JavaScript Ajax calls to retrieve the HTML data and show it in a Div.

Your Answer

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

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