Search the FirstSpirit Knowledge Base
Hello Team,
We are migration from FS 5.1.507 to FS 5.2.611, in the module we have geca.getData ().getReferences () which is deprecated and now we need to replace it with code. But the module has doing some operation and finally the setting new reference in to the reference object.
How to achieve the setReferencedObject () in the new api ??
for (GCAPage gcaPage : gcaPages) {
Reference[] references = gcaPage.getData().getReferences();
if (references != null && references.length != 0) {
for (Reference ref : references) {
reference.setReferencedObject(new Object ());
}
}
}
Hi,
use this one
References[] references = gcaPage.getIncomingReferences();
for(Reference ref : references){
// ...
}
Best regards,
Marcel
Hello Mr. Marcel Liebgott
I already tried it is not working. getIncomingReferences will return the GCA's references but the data's references.
Regards,
Vasandharaj M.
Hi,
I'm not a professional but in the documentation stands:
getData() Deprecated since 4.2.440 - use getFormData() instead.
Reference[] references = gcaPage.getData()getFormData.getReferences();
The references you can call directly:
Reference[] references = gcaPage.getReferences();
I hope it helps
Best regards,
Ahmad
Hello Ahmad,
The API clearly mentioned that its referenceEntry not the Reference. Anyway i am looking to FormData to get the reference. will let you know once i found the way for this.
Set<ReferenceEntry> refSet = gca.getReferences();
Hi,
since the new API seems to not provide the methods you need anymore, did you find a solution for your problem already?
Best regards,
Hanes