1

I am getting an error while deploying a project to the Timer Jobs. It keeps shooting me an error that says "Column does not exist", when I go to my list and my code, there is no such variable or column as what they are describing. Is there anything that I should troubleshoot to find a solution?

Here is a bit of my stack Trace:

01/03/2012 13:04:31.72 OWSTIMER.EXE (0x09DC)
0x0A30 SharePoint Foundation Timer
6398 Critical The Execute method of job definition New_Phonebook.TimeJob (ID 20b70727-9f93-4b5c-9341-2f2d34d65d89) threw an exception. More information is included below. Column 'PhoneBook' does not exist. It may have been deleted by another user. c656785a-8633-49e0-9d25-5717d2131286 01/03/2012 13:04:31.72 OWSTIMER.EXE (0x09DC) 0x0A30 SharePoint Foundation Timer 72ae Unexpected Exception stack trace: at Microsoft.SharePoint.SPFieldCollection.GetField(String strName, Boolean bThrowException) at Microsoft.SharePoint.SPListItem.SetValue(String strName, Object value, SPField field, Boolean protectFields, Boolean skipValidation) at Microsoft.SharePoint.SPListItem.set_Item(String fieldName, Object value) at New_Phonebook.TimeJob.Execute(Guid contentDbId) at Microsoft.SharePoint.Administration.SPTimerJobInvokeInternal.Invoke(SPJobDefinition jd, Guid targetInstanceId, Boolean isTimerService, Int32& result) c656785a-8633-49e0-9d25-5717d2131286

7
  • 1
    Please, provide your particular code and the exact error message. Commented Jan 3, 2012 at 16:44
  • Column 'X' does not exist. It may have been deleted by another user. There isn't any code that has X in it, thats why I am confused
    – coffee_man
    Commented Jan 3, 2012 at 17:04
  • What gives you the error? Is there a stack trace?
    – Kit Menke
    Commented Jan 3, 2012 at 17:12
  • This is the error given when ran on the SharePoint 2010 Central Admin -> Job History page
    – coffee_man
    Commented Jan 3, 2012 at 17:24
  • 2
    Something is wrong in the New_Phonebook.TimeJob.Execute method. If we could see the code, we could advise something. P.S. And please, the next time, if you're providing additional details, edit your question instead of adding new answer. There is an edit link right under the question. Commented Jan 3, 2012 at 22:22

3 Answers 3

1

It looks like you have a namespace called New_PhoneBook with a class within it called TimeJob. The error is coming from the Execute method.

The code you're looking for within that method is the part that changes the value of a list item and updates it. For example:

item["PhoneBook"] = "value";
// or
item[internalName] = "value";

// and

item.Update();
// or
item.SystemUpdate();

If the name of the field is unfamiliar, then this call may well be in a for loop on a list's fields, and the item may be the result of an earlier query that does not include that field.

0

Is "PhoneBook" an alias for a another column like "Title"? Did you mean "Phone Book" instead of "PhoneBook"? Somewhere in your code you are referencing a column called "PhoneBook" - that is why you are getting an error on .GetField( fieldname,..)

0

This happens when you change/update your column name what sharepoint does it update the column display name only and the internal name remain same.

To get the correct col name always do the below:

  1. Go to List Settings Page and Click on the Column you want to use in code

enter image description here

  1. Copy the column name from the URL

enter image description here

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.