Some Errors I encountered and the Solutions

Mar 10, 2008 at 7:52 PM
"object reference not set to an instance of an object" When clicking on Edit Mappings:
queryString = String.Format(CultureInfo.InvariantCulture, "SELECT ID FROM sfATTRIBUTES WHERE AccountID = {0} AND InternalName='WORKFLOW_STATUS'", accountId); command = new SqlCommand(queryString, connection);
int WFAttributeID = (int)command.ExecuteScalar();

Error is thrown when ExecuteScalar returns null. Make sure you set the Portfolio Server Account Id properly and that query does in fact return something.

"The given key was not present in the dictionary" When clicking on Edit Mappings:
The default EPMSync.config that came with the installation already contained some Field Mappings. Delete everything between the <FieldMappings> tags and it should work.
Mar 9, 2009 at 7:52 AM
I am also getting the "object reference not set to an instance of an object" error when clicking on the Edit mappings.  I have followed the instructions above but I unfortunately need further information to ensure I am completing the resolution correctly. 

- I am unable to locate the query string that is mentioned above in the .config file. Is it possible to find out where this is? Is it important to find and if so what do I do when I find it?

- I am unsure of the information regarding the Portfolio account id - what does this relate to?  I have checked through the Portfolio server Databse and found two table the wfuser table and the wfattribute table I have entered into this fied all the user account id's and also the values from the id column.  I have had no luck in getting passed the error. 

Any assistance would be greatly appreciated with this.