Solved

What is the use of "Method Name" in Object connections

  • 24 February 2022
  • 8 replies
  • 259 views

Userlevel 2
Badge +5

Hello,

I want to know how to use “Method Name” in Object Connections. When I change this field, nothing seems to happen. Could someone in the community explain for me, please ?

 

 

icon

Best answer by Ragul Ravindira 24 February 2022, 15:56

View original

This topic has been closed for comments

8 replies

Userlevel 5
Badge +12

Hello @Daniel_JZH ,

 

The Method Name is a function that will be invoked on the keys in the package to provide a lead text in the connection dialog. The connection will be live in all forms in the window client where the View for the specified LU is the base for the form.

 

You can find more information regarding 'Object Connections' here: https://wit.ifsworld.com/f1docs/apps10/foundation1/040_administration/220_user_interface/130_object_connections/

 

Hope this helps :)

 

Best Regards,
Ragul

Userlevel 7
Badge +18

Hi @Daniel_JZH,

According to the documentation ,

https://docs.ifs.com/techdocs/foundation1/040_administration/220_user_interface/130_object_connections/default.htm

the Method Name is the name of the method in the package that is used to return a description to be used in the connection dialog.

 

Userlevel 2
Badge +5

hi @Ragul Ravindira @Himasha Abeywickrama,

Thank you for your answers.

@Himasha Abeywickrama, I’ve seen the description in the documentation, but I don’t understand what it means…

@Ragul Ravindira, I cant open your link, I suppose it’s the same with that @Himasha Abeywickrama send me ?

Do you have an example for me, please ?

Userlevel 5
Badge +12

Hello @Daniel_JZH ,

 

Yes it is the same documentation.

To give you more clarification, As mentioned in the documentation 'Method Name' is used to output a lead/descriptive text in the connection dialog. So that we can display a more descriptive text for clear understanding.

 

You can refer the below mentioned example for reference:

  1. Navigate to ‘Object Connections’ window (Solution Manager > User Interface > Object Connections).
  2. Add a new Method Name: Get_Doc_Object_Description for the LU Name: PersonInfo.
  3. Now Navigate to ‘Document Revision’ window, Query for a document. Click on ‘Objects’ tab and enter a new entry.
  4. Select ‘Person Info’ as the Object ID. Then select a Person entry and click ‘OK’.
  5. Now you can see a more clear value for the ‘Object Description’  field under the ‘Objects’ tab. Rather than just displaying the Person ID, Now we can see both Person ID and their Name concatenated with a ‘-’. 

     

I hope now you got a clear understanding on how ‘Object Connections’ and ‘Method Name’ works.

 

Best Regards,
Ragul

Userlevel 6
Badge +14

Hi @Daniel_JZH as an example if you check the object connection window for LU InventoryPart you can see that method name is defined as Get_Description ( inside INVENTORY_PART_API)

 

And below is a document attached to one of the object of type InventoryPart. There you can see that there is a value for Object Description field (highlighted) 

 

So how does the application know where to pull these object description data? It is from the method you define in the Object connection window. System uses that method with the values from the object key to figure out which object description should it have. 

Hope this is clear.

 

Thanks

Userlevel 2
Badge +5

@Amila Samarasinghe @Ragul Ravindira Thank you both for your explanation.

I understand now the methods “get”. But I still have a question with the methods “create”. In my example below, what will happen when I select the method “Create_New_Folder” ?

 

 

Userlevel 6
Badge +14

@Daniel_JZH  There wont be any errors thrown but system will not fetch any value for object description field as well since it is not a valid method

Userlevel 5
Badge +12

Hello @Daniel_JZH ,

 

When you use ‘Create_New_Folder’ instead of a GET method, You won’t be able to view anything in the ‘Object Description’ field as shown below:

 

 

But, when you use a GET method, It will display the relevant information in the ‘Object Description’ field in a more descriptive way.

 

 

 

So, as mentioned by @Amila Samarasinghe , You won’t be getting any errors for using the ‘Create_New_Folder’ method. The ‘Object Description’ field will be displayed empty when you create a new object connection to a specific document when using such non-valid method.

But if you use any GET methods for the Method Name, Then you will be able to display the relevant data in the ‘Object Description’ field.

 

I hope this helps :)

 

Best Regards,

Ragul