// Fetch any relationships that may not exist in this context
this.fetchRelationships("ATEN_VPR_File");
Item relationships = this.getRelationships("ATEN_VPR_File");
// Get the count of the relationships
int count = relationships.getItemCount();
// Store the count in the property on the item
this.setProperty("_h_test", count.ToString());
// And let the apply that will be called after this onBeforeUpdate save that property to the database
return this;
Chris