Outline codes in ProjectTasksCreate

J

joy

Is there any way set value for OutlineCodes or custom fields like "Text1"
from PDS ProjectTasksCreate?

Joy
 
S

Stephan Steiner

joy said:
Is there any way set value for OutlineCodes or custom fields like "Text1"
from PDS ProjectTasksCreate?

Joy

I'm afraid not. If you download the SDK, you'll find a sample PDS
extender that writes task enterprise fields (text fields only), and
that you can extend to also write other fields than text fields. As far
as outline codes go, I'm currently trying to figure that out, without
success so far :(
 
S

Stephan Steiner

Alright, I managed to reverse engineer the outline codes.

First of all, look up the FieldID in MSP_CONVERSIONS. The
MSP_CODE_FIELDS table will then link you to the appropriate entry in
MSP_OUTLINE_CODES.

FieldID from MSP_CONVERSIONS corredponds to CODE_FIELD_ID in
mps_code_fields. So if you want for instance task enterprise task
outline code 5 (fieldid = 188744427) for the task with a task_uid
@mytaskid and in the project with project ID @myprojectID, the sql
query would be:

select oc_name, oc_description from msp_outline_codes moc
inner join msp_code_fields mcf on moc.code_uid = mcf.code_uid
where moc.proj_id = @myprojectid and moc.code_category = 0 and
code_field_id = 188744427 and moc.code_ref_uid = @mytaskid

you can of course add additional joins to make the lookup easier but
you need the project id, task uid and the field id and then you can
look up the outline code. Similarly, I figure adding an outline code
would just correspond to making an entry in the msp_code_fields table
which links the pre-existing msp_outline_codes entries (those come from
the enterprise global).

Hope that helps
Stephan
 

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