Community Tip - You can change your system assigned username to something more personal in your community settings. X
I use below code to modify WTDocument attirbute by batch, a wired problem, I have many customized attributes like: "BoardNumber,SchematicNumber,DrawingNumber,FilmRev,description,CreatedDate,ECONumber,LeadStatus,CADTool,CADToolVersion,LastUser"
I can update "BoardNumber" independently, but I can't update it with other attributes together, get the error
"
",
other attributes any be updated together. In "Type and Attribute Management", "BoardNumber" is required , but like "LeadStatus" is also required, who could help me? Thanks in advance.
for(String key:map.keySet()){
System.out.println(key+" : "+map.get(key));
obj.load(key);
obj.set(key,map.get(key));
doc = (wt.doc.WTDocument) obj.apply();
wt.fc.PersistenceHelper.manager.modify(doc);
}
What if you move the apply and modify right below the loop.
doc = (wt.doc.WTDocument) obj.apply();
wt.fc.PersistenceHelper.manager.modify(doc);
When I move apply and modify out of the loop, I just can modify the latest attribute in my TreeMap, the other modification can't work out. Other attributes except "BoardNumber" can be any combined for modification, very strange.