Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Find a Guid of lookup custom field - programmatically

$
0
0

hello forum members,

I am trying to update a project custom field that is based on lookup table and can't figure out how to find a look up table value' GUID. Here is what i got so far. Any ideas are appreciated. 

 // LookupTable web service  
                    SvcLookupTable.LookupTableDataSet lookupTableDs = lookupTableClient.ReadLookupTables(string.Empty, false, 1033);

                    SvcCustomFields.CustomFieldDataSet customFieldDs = customFieldsClient.ReadCustomFields(string.Empty, false);
                    SvcCustomFields.CustomFieldDataSet.CustomFieldsDataTable cfDataTable = customFieldDs.CustomFields;

                    for (int i = 0; i < cfDataTable.Count; i++)
                    {
                        if (cfDataTable[i].MD_PROP_NAME == "Investment Type")
                        {
                            _lookupCustomFieldGuid = cfDataTable[i].MD_PROP_UID; //not correct, find by value
                            _lookupTableUid = cfDataTable[i].MD_LOOKUP_TABLE_UID;

                            break;
                        }

                    }


tatiana




Viewing all articles
Browse latest Browse all 5347

Trending Articles