cancel
Showing results for 
Search instead for 
Did you mean: 

On a UDF (on a system table) add a CFL (linked to a system table)

simone_pastorin
Participant
0 Kudos

Hello,

I added a UDF to OITM, named say "XXX_RootOfPrj". It appears on the standard UDFs panel:

Users should type a project code (OPRJ.PrjCode) here.

For helping them I need to add a ChooseFromList on this UDF, linked to OPRJ.

So I added this line in the UDF definition:


oUserFieldsMD.LinkedTable = "OPRJ";

But when I Add() the UDF I get:


Errore -5002: Il campo 'Tabella collegata' dovrebbe essere formato da 8 car. alfanumerici senza val. standard validi

Which means more or less:


Error -5002: 'Linked table' field should be formed by 8 alphanumeric characters without standard valid values

Maybe is it impossible what I want to do? It's odd that I can link a UDT but not a system table...

Maybe should I use a workaround, like manually attaching a CFL on the form using UI API?

Accepted Solutions (1)

Accepted Solutions (1)

edy_simon
Active Contributor
0 Kudos

Hi Simone,

Linked Table does not support system table.

Your option is to create a formatted search.

Regards

Edy

simone_pastorin
Participant
0 Kudos

Thanks Edy,

now I got it!

  • Create a query for the formatted search, like this:

select PrjCode, PrjName

from OPRJ

  • Add this user query to B1 as a saved query
  • Open Item Master Data, select your UDF, press Alt + Shift + F2
  • In the dialog select "Search in Existing User-Defined Values according to Saved Query", click on "Open Saved Query", select the saved query above and you are done.

Now the user can pick a valid project code from a CFL.

Kind regards

Answers (0)