Samples
•
Version: 9
Some tooltip text!
• 1 minute to read
• 1 minute to read
List available project types
SearchEngine se;
se.addFields("ProjType", "ProjType_id,name");
print(se.executeTextTable());
Get an updated list of statuses
NSListAgent listAgent;
NSProjectStatus[] statuses = listAgent.GetProjectStatuses();
foreach (NSProjectStatus s in statuses) {
printLine(s.GetId().toString() + " " + s.GetValue());
}
Or:
SearchEngine se;
se.addFields("ProjStatus", "ProjStatus_id,name");
print(se.executeTextTable());
Check if project is connected to a guide
NSProjectAgent agent;
NSListAgent listAgent;
NSProjectEntity p = agent.GetProjectEntity(4);
NSProjectTypeEntity type = listAgent.GetProjectTypeEntity(p.GetProjectType().GetId());
if (type.GetHasGuide()) {
printLine("This project has a guide!");
}
else {
printLine("This project does not have a guide.");
}
Note
GetProjectType()
returns an NSProjectType object, while you need an NSProjectTypeEntity object to call GetHasGuide()
. You can use the list agent to do the "conversion".