1

I have a number of custom jobs that my program adds to my SharePoint environment. I noticed that there is no option to give the job a particular ID/GUID in the constructor. So my question is: How is new job's GUID/ID assigned when created and submitted?

I'm aware that I can access and modify that member of the SPJobDefinition, but I'm curious how it's set otherwise.

1 Answer 1

1

When the instance of job definition is created it ID property is initialized via base SPPersistedObject constructor to Guid.NewGuid() :

protected SPPersistedObject(string name, SPPersistedObject parent)
  : this(name, parent, Guid.NewGuid())
{
}

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.