Enterprise Lookup Tables - vsto

I have Microsoft Project 2010 Server.
How can I read all values defined for enterprise lookup table from inside of Microsoft Project 2010? I use VSTO.
Have already tried Application.GlobalOutlineCodes, Application.ActiveProject.OutlineCodes with no luck.

The easiest way is to read the data through PSI - you just call PSI from your VSTO add-on. Of course you can read LookupTable from MS Project, but COM is much slower than PSI calls over WCF or .asmx.
I keep a reference to all enterprise custom fields in my add-ons and lookups for them cached. Here is a sample how to read Custom fields and Lookups for them using PSI

Related

How do I build an MS Project team with VBA?

I have an MS Project Server 2010 running with a number of enterprise resources set up. I need to create a project via VBA, populate it with tasks and assign enterprise resources to tasks.
I am capable of creating tasks and assigning project resources to them, but I cannot assign enterprise resources. Once I create a new project, its resource list is empty. I can add enterprise resources to the project manually with TeamBuilder, and then they can be assigned, but I don't see a way to add enterprise resources to project via VBA. I tried to record a macro while adding resources, but it doesn't reflect the process and allows me only to open TeamBuilder.
How can I add enterprise resources to my project?
Well, I did find an answer. It's EnterpriseResourceGet method of Project app. Probably it will save someone some nerve and let curse Microsoft a bit less. Getting resource UID via VBA is a different and fascinating story.

How do I upload an Excel sheet to a SQL table in a Lightswitch web client?

I have a lightswitch project in visual studio 2013, using vb.net. I would like the user to be able to click a button and have lightswitch find an excel file, and upload that file to a sql table according to a pre-determined column mapping.
My preference was to use the Office Integration extension for visual studio, which I got working with VS 2013 by downloading it from this link: http://www.ge.tt/71iuRQv/v/0
However, the documentation and examples for office integration seem to be very heavy on getting an excel spreadsheet into a display in the lightswitch web client, rather than into the sql data table, which is where I need it. Here are the examples I've been following:
http://blogs.msdn.com/b/bethmassi/archive/2012/07/18/new-and-improved-office-integration-pack-extension-for-lightswitch.aspx
Alternatively, I have an existing stored procedure, and I can request that the server call this stored proc by sending a web API extension from the client to the server. I have this working already for other stored procs, according to examples from Beth Masi and Paul van Bladel. (Stackoverflow won't let me post the links...)
The undesirable part of this approach is that the stored proc is old, and messy.
I've searched and searched, but have yet to find anyone approach this problem for VS 2013 with lightswitch. Any useful advice?
I've used the method detailed by Matt Sampson to store word files and it works very well. Since it just stores the raw binary it should handle Excel files just as well.
If you're creating the table in LightSwitch, use the Binary Type. If you use SQL create scripts use varbinary(MAX).
You need to create a custom Silverlight dialog box to gain access to the OpenFileDialog object. Then open the file in as a FileStream.
Finally, you need to add a handler for the closed method of the control and then show the control to the user. Most likely done in a button. This needs to be done on the main dispatcher.
The code examples are in C# but I just used one of the many available translators out on the web and copy/pasted the VB.NET code.
Another option might be to consider shelling out to the DTSEXEC run-time to execute an SSIS package to perform the upload - especially if the target Excel spreadsheets have predefined layouts and content data types.
Even simpler, you might be able to use the SQL Server BULK INSERT command to get the job done - although that would require a SQL Client connection to your database.
HTH

Using SharePoint to custom develop a GUI for an SQL Server backend?

Is it possible to use use SharePoint to custom develop a GUI for an SQL Server backend for updating the data? Thanks.
If you are using SharePoint 2007 you might want to take a look at the Business Data Catalogue - http://msdn.microsoft.com/en-us/library/ms563661(v=office.12).aspx
Not sure what the comparable feature (if any) in 2010/2013 is...
EDIT:
In 2013 it is called Business Connectivity Services - http://msdn.microsoft.com/en-us/library/jj163782.aspx#BCSoverview_Whatcanbcsdo
Look at "Business Connectivity Services" and "External List".
SharePoint Designer can make the process pretty simple or you can develop a Visual Studio project:
http://msdn.microsoft.com/en-us/library/ee558778(v=office.14).aspx
If you want to do the legwork try building an Access Application in SharePoint 2013.
It is much better than 2010 but requires more setup. This will encapsulate a database within a SQL database, very versatile super quick and you can do all your SQL fun stuff from there.
This is a low or no code solution.
SharePoint 2010 Access apps use lists as back-end repositories, you can interact with the data in the SharePoint WSS_Content database, but it is not supported and no advisable.

Automate MS project

Is there a way that we can automate the input in ms project 2010. Below are the scenarios:
We have a vb.net application that uses to inputs task name, hours, estimate and completion date time.
Is there a way that we can upload those date in ms project 2010.
There is a way. If you use desktop version of MS Project (Pro or Standard) then the only option you have is to use OLE automation.
Through the OLE Automation you will get a reference to an instance of Application class which is key class in every MS Office application. From the Application you can get a list of currently open projects using Application.Projects collection or even get current project using Application.ActiveProject.
As soon as you have a reference to a project you can access all tasks in the project using Project.Tasks collection. (Index of all collections starts with 1)
The most of Task fields like Name or Start date are available through properties of a Task: Task.Name = "something" or Task.StartDate = "1/1/2001"
Anyway here is a link: msdn.microsoft.com
Another story is if you have Project Server and you want to do all the things faster. In this case you should use PSI (Project Server Interface) - collection of web services which give you access to the most of Project Server functions.
MSDN has great articles with samples how to work with projects using PSI and here is a link: MSDN about PSI. You can search around the link to find more articles about other services available through PSI.
If you're able to put your data into Excel as mentioned in your comment, then it would be fairly straightforward to write a VBA program that reads the excel data and updates the Project tasks with the data in the workbook.

Migration from SharePoint 2007 to SharePoint 2010

I am looking for a migration tool. We want to upgrade from SharePoint Server 2007 to SharePoint 2010 in a new environment. We need to have functionality to granulary select which content to migrate and eaven select to map to new structure in the new solution.
We want to tag the content migrated.
The migration tools we are considering are AvePoint, Axceler Davinci, Metalogix.
I'm doing migration scenarios for a consultant firm based in Montreal. First of all, I think you have the correct thinking about how you want to get this done. Doing a SharePoint upgrade (database upgrade) usually bring your SharePoint 2007 problems over to SharePoint 2010.
Here's what we usually do :
Define governance for the new SharePoint platform
Define the new Information Architecture
Implement the new Information Architecture (build sites, lists, libraries, etc.)
Migrate the content over
Tools such as Sharegate (www.share-gate.com) can allow you to do some mapping from your old content source over to the new one.
Hopefully, this will help you!