PSI: How To Update Task Ent. Custom Field

W

Winnes

Following situation:

CheckOutProject
ReadProject
taskRow = dsTasks.Task.FindByTASK_UIDPROJ_UID ...

lookup certain TaskCustomFieldsRow and set its TEXT_VALUE to a new value.

QueueUpdateProject
QueueCheckInProject

--> Result: my Custom Field is not updated... no exceptions... what am I
doing wrong
 
S

Stephan Steiner

I take it this is project server 2007 you're looking at (always helpful to
mention the version), but unless the DB schema has changed significantly,
this should still do the trick:

UPDATE ProjectServer.dbo.MSP_PROJECTS SET PROJ_EXT_EDITED = 1,
PROJ_EXT_EDITED_TEXT = 1

server Bottom line is that if you make any DB changes from an external app,
the PROJ_EXT_EDITED field needs to be set to 1, plus the appropriate
PROJ_EXT_EDITED_<Type> (in your case you're changing an enterprise text
field so <Type> becomes TEXT.

By the way, forgive me for interjecting, but are you also creating tasks
programmatically? I'd be very interested in knowing whether the approach
mentioned below will result in those new tasks being published without
requiring any manual interaction (this is killing us with the 2003 release).

Regards
Stephan
 
A

Adam Behrle

Winnes,

First are you calling GetJobCompletionState after each submission to
the Queue to see if any errors were returned or making sure it
completes?

Also, instead of ReadProject you might try ReadProjectEntities.

Hope this helps,

Adam Behrle
QuantumPM
 
W

Winnes

Found the solution:

Did a LoadDataRow, which should be left out
AND applied GetChanges to the dataset sent, in order to pass only delta info
to QueueUpdateProject

That's it!
 
J

Jyoti Kherwa

Do you have any sample code to update timesheet using PSI.
or can you share the code regarding any update through psi (for eg-update
custom field)
 
D

Duffman

Hello All,

I have benefited from this post imensely so thanks right off. I have used
this code:

CheckOutProject
ReadProjectEntities
taskRow = dsTasks.Task.FindByTASK_UIDPROJ_UID ...

lookup certain TaskCustomFieldsRow and set its TEXT_VALUE to a new value.

QueueUpdateProject
QueueCheckInProject

I am struggling with and can't see how to get from the found taskRow to
TaskCustomFieldsRow and the subsequent update. Please help I know it has to
be my limited knowledge of the objects relation.

Thanks,
Duffman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top