assigning EnterPriseCustomField to TaskCustomField

R

rama

Hi,

I have an enterprise custom field "AssignmentState" which is mapped to a
lookup table "AssignmentState". I configured this in PWA. I want to assign
this custom field to a Project task custom field using PSI. How do I do this.
I don't see any property in ProjectDataSet.TaskCustomFieldsRow to set the
look up tabel UID like CustomFieldDataSet.CustomFieldsRow
has..[MD_LOOKUP_TABLE_UID]. Please let me know how to do this.

Rama
 
A

Andrew Jacks

G'Day

I think you do not need to use the TaskCustomFieldsRow to create a task
custom field linked to a lookup table.

All you need to do is add the custom field through the custom fields row,
setting the custom field to be task and setting the lookup Guid: -

CustomFieldsWebSvc.CustomFieldDataSet.CustomFieldsRow customFieldsRow =
customFieldDataSet.CustomFields.NewCustomFieldsRow();

customFieldsRow.MD_PROP_UID = Guid.NewGuid();
customFieldsRow.MD_PROP_NAME = "Name of your Task"
customFieldsRow.MD_ENT_TYPE_UID = Guid of Task;
customFieldsRow.MD_PROP_TYPE_ENUM = FIELD_TYPE_ENUM;

customFieldsRow.MD_LOOKUP_TABLE_UID = Guid of lookup;

customFieldDataSet.CustomFields.Rows.Add(customFieldsRow);


Note FIELD_TYPE_ENUM
4 Date
6 Duration
9 Cost
15 Number
17 Flag
21 Text
27 Finish Date

You can get the task guid from the published database using

select * from msp_web_view_tables


Let me know how you get on
 
R

rama

Hi Jacks,

Thanks for the reply. I figured a way to assign lookup table TaskCustomField
"AssignmentState".
When I assign AssignmentState as "OPEN" or "Completed" to TaskCustomField
"AssignmentState", its storing GUIDs instead of actual values.
How do I read lookup table value from lookup table given a GUID.
--
Rama Narisetty


Andrew Jacks said:
G'Day

I think you do not need to use the TaskCustomFieldsRow to create a task
custom field linked to a lookup table.

All you need to do is add the custom field through the custom fields row,
setting the custom field to be task and setting the lookup Guid: -

CustomFieldsWebSvc.CustomFieldDataSet.CustomFieldsRow customFieldsRow =
customFieldDataSet.CustomFields.NewCustomFieldsRow();

customFieldsRow.MD_PROP_UID = Guid.NewGuid();
customFieldsRow.MD_PROP_NAME = "Name of your Task"
customFieldsRow.MD_ENT_TYPE_UID = Guid of Task;
customFieldsRow.MD_PROP_TYPE_ENUM = FIELD_TYPE_ENUM;

customFieldsRow.MD_LOOKUP_TABLE_UID = Guid of lookup;

customFieldDataSet.CustomFields.Rows.Add(customFieldsRow);


Note FIELD_TYPE_ENUM
4 Date
6 Duration
9 Cost
15 Number
17 Flag
21 Text
27 Finish Date

You can get the task guid from the published database using

select * from msp_web_view_tables


Let me know how you get on



rama said:
Hi,

I have an enterprise custom field "AssignmentState" which is mapped to a
lookup table "AssignmentState". I configured this in PWA. I want to assign
this custom field to a Project task custom field using PSI. How do I do this.
I don't see any property in ProjectDataSet.TaskCustomFieldsRow to set the
look up tabel UID like CustomFieldDataSet.CustomFieldsRow
has..[MD_LOOKUP_TABLE_UID]. Please let me know how to do this.

Rama
 
R

rama

Hi Jacks,

Thanks for the reply. I figured a way to assign lookup table TaskCustomField
"AssignmentState".
When I assign AssignmentState as "OPEN" or "Completed" to TaskCustomField
"AssignmentState", its storing GUIDs instead of actual values.
How do I read lookup table value from lookup table given a GUID.
--
Rama Narisetty

Andrew Jacks said:
G'Day

I think you do not need to use the TaskCustomFieldsRow to create a task
custom field linked to a lookup table.

All you need to do is add the custom field through the custom fields row,
setting the custom field to be task and setting the lookup Guid: -

CustomFieldsWebSvc.CustomFieldDataSet.CustomFieldsRow customFieldsRow =
customFieldDataSet.CustomFields.NewCustomFieldsRow();

customFieldsRow.MD_PROP_UID = Guid.NewGuid();
customFieldsRow.MD_PROP_NAME = "Name of your Task"
customFieldsRow.MD_ENT_TYPE_UID = Guid of Task;
customFieldsRow.MD_PROP_TYPE_ENUM = FIELD_TYPE_ENUM;

customFieldsRow.MD_LOOKUP_TABLE_UID = Guid of lookup;

customFieldDataSet.CustomFields.Rows.Add(customFieldsRow);


Note FIELD_TYPE_ENUM
4 Date
6 Duration
9 Cost
15 Number
17 Flag
21 Text
27 Finish Date

You can get the task guid from the published database using

select * from msp_web_view_tables


Let me know how you get on



rama said:
Hi,

I have an enterprise custom field "AssignmentState" which is mapped to a
lookup table "AssignmentState". I configured this in PWA. I want to assign
this custom field to a Project task custom field using PSI. How do I do this.
I don't see any property in ProjectDataSet.TaskCustomFieldsRow to set the
look up tabel UID like CustomFieldDataSet.CustomFieldsRow
has..[MD_LOOKUP_TABLE_UID]. Please let me know how to do this.

Rama
 

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