It's all about the answers!

Ask a question

buildClient. getBuildDefinition(, myProgressMonitor) ,How know Field_ID

Hassan Tawfik (114) | asked Nov 12 '15, 3:10 a.m.
 I tried to develop RTC Client using RTC API and now this client  can connect to RTC Server ,

any one can illustrate how to get Field values from  RTC server  and how to know
Field ID which used in the following  Code .

buildClient. getBuildDefinition(<
Field_ID>, myProgressMonitor)

Thanks for your Cooperation and Understanding .

One answer

permanent link
Ralph Schoon (62.0k33643) | answered Nov 12 '15, 4:22 a.m.
Start here: . You will need to pass this as a parameter to the call, or you will have to query the data for some information. In the example below the Build Definition ID is hardcoded. You could have it as a parameter of type string. The information can be read in the RTC UI's - the name of the build definition in this case.
       ITeamBuildClient buildClient = (ITeamBuildClient) teamRepository.getClientLibrary(ITeamBuildClient.class);
        IBuildDefinition buildDefinition = buildClient.getBuildDefinition("Production", monitor);

Or you need to find some API to find all the data (all build definitions), resolve and get the information from them and narrow it down. You would still need some information for how to narrow it down.

Your answer

Register or to post your answer.