Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi.
i want to get a user defined properties value of my change orders by vault api using c#.
how can i get value of a user defined properties named : Responsible discipline
i write this code but it doesn't work.
foreach (var changeOrder in AllChangeOrders)
{
MessageBox.Show(changeOrder.Num);
// Get the user-defined property definition for "Responsible Discipline"
PropDef responsibleDisciplinePropDef = VaultConnection.WebServiceManager.PropertyService.GetPropertyDefinitionsByEntityClassId("CUSTENT_CHANGEORDER")
.FirstOrDefault(pd => pd.DispName == "Responsible Discipline");
if (responsibleDisciplinePropDef != null)
{
// Get the value of the "Responsible Discipline" property for the change order
PropInst responsibleDisciplinePropInst = VaultConnection.WebServiceManager.PropertyService.GetProperties("CUSTENT_CHANGEORDER", new long[] { changeOrder.Id }, new long[] { responsibleDisciplinePropDef.Id })
.FirstOrDefault();
string responsibleDisciplineValue = (string)responsibleDisciplinePropInst.Val;
}
}
please help me .
thank you
Solved! Go to Solution.