vasanth
I'm new here

GetReference () Deprecation

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 ());

                }

            }

}

0 Kudos
5 Replies
MarsDD
Occasional Observer

Hi,

use this one

References[] references = gcaPage.getIncomingReferences();

for(Reference ref : references){

     // ...

}

Best regards,

Marcel

0 Kudos

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.

0 Kudos
zeus83
I'm new here

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 Smiley Happy

Best regards,

Ahmad

0 Kudos

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();

0 Kudos
tenter
I'm new here

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

0 Kudos