Using Multiple Area and Length Units in Java Classes
Using Multiple Area and Length Units in Java Classes
Custom workflow rules that support custom UI controls or custom reports can use the Java API methods to convert values from Base Units to Converted Units and back.
User user = ContextStore.get().getUser();
Double area = someRecord.getDouble("rm.area");
Double convertedArea =
area * user.getAreaUnits().getConversionFactor();
area =
convertedArea / user.getAreaUnits().getConversionFactor();
String areaTitle = user.getAreaUnits().getTitle();
String convertedAreaTitle =
user.getAreaUnits().getConvertedTitle();