Skip to content

Commit

Permalink
getRefFieldTargetObject release note
Browse files Browse the repository at this point in the history
  • Loading branch information
alistairwheeler committed Jan 22, 2025
1 parent 5e7f40c commit b95aae7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -413,4 +413,4 @@ ex: home_ajax_DemoOrder_DemoHome_2

### 6.1.21 (UNRELEASED) <span id="version-6.1.21"></span>

- Nothing so far...
- Backported `getRefFieldTargetObject` hook
17 changes: 17 additions & 0 deletions content/CTG_99_versions/CTG_10_release-notes/LSN_80_v6-2/v6-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,23 @@ the PDF document information (title, ...), and the potential form fields entered

- New filter "not in" on ENUM field to search unknown LOV values, displayed as "(other)" on UI.

- New `getRefFieldTargetObject` hook to override the target record of a referenced field :
```java
@Override
public String[] getRefFieldTargetObject(String rowId, ObjectField field, String[] row) {
if (field.getFullInput().contains("myForeignKey")) {
rowId = getFieldValue("myOtherFkValue"); // target id
String t[] = new String[3];
String target = "MyOtherObject";
t[0] = target; // target object
t[1] = "the_ajax_"+target; // main target instance
t[2] = rowId; // target id
return t;
}
return null;
}
```

UI changes <span id="uichanges"></span>
---------------------------------------

Expand Down

0 comments on commit b95aae7

Please sign in to comment.