Name of User defined filed

lock
push_pin
done
Answered
2

Trying to run following code snippet, that is found here: https://docs.superoffice.com/en/automation/crmscript/howto/custom-objects/udef.html

 

This returns a list of all User-defined fields on the company card, with the ProgID, with DisplayText and DisplayTooltip.

How can i get the name of the field, instead of just the ProgID? I've tried using DisplayTooltip, but when changing this in Fields does not work, it is always blank for all fields. 

 

12 Mar 2025 | 08:28 AM

All Replies (2)

If you want the definition of the custom fields on entity (and not the actual values specified on a specific record), you can do the following:

NSUserDefinedFieldInfoAgent udfAgent;

foreach (NSFieldInfoBase customField in udfAgent.GetCustomFieldInfoList("contact", false))
{
    printLine(customField.GetDisplayName() + " => " + customField.GetFieldName());
}
12 Mar 2025 | 08:42 AM
Thanks :)
12 Mar 2025 | 09:21 AM

Add reply