Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle Field ID's between environment

SaravananRajara
Collaborator III

We are creating and getting field values using Archer SOAP API from external java application.  The java team facing some difficulty to use different field ids for each environment.  Could anyone please tell the best way to handle this?

 

We are using 5.5 SP4 P3 version of Archer.

 

Thanks in advance for your responses.

2 REPLIES 2

SamSalefske1
Contributor III

It takes some work before hand to gather all the fieldIDs needed for each environment, but it works for me:

 

I always put the fields I'm working with in the three config files (DEV, TEST, PROD), and then within each of those I usually try and keep it formatted like "applicationname_fieldname_FieldId=FIELDID". I've got some helper methods that then extract the ID and use that when building my searchXML or whatever I'm doing.  Before I do a build, I make sure the actual App.Config file is targeting the correct environment and if not do a quick copy and paste before i build. 

 

pastedImage_1.png

pastedImage_2.png

BodieMinster
Archer Employee
Archer Employee

I like to store GUIDs in the config file that the "user" will edit. That way they only need to store the value one time for all environments. At runtime, my program writes a config file that the "user" does not edit. I'll look each field up by GUID and store the fields' IDs in the new config file. If the file is not present, my app writes it. If it's present, it will use it. It's a form of persistent cache. You can add additional checks to invalidate the file at regular time intervals, if you prefer, but I usually just let someone delete it if they want to invalidate it.