This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Get Translated Caption for a Single Object in a Table in a customer script

Im working with 7.1.3.

In a Custom Script in need the translations for a single object in a table.

For example von the table ADSGroup it would be en: "Active Directory group", fr: "Groupe Active Directory", ... (but not the plural like en: "Active Directory groups"

Is there a simple solution (for example a predefined script) to do that for any table?

Parents
  • The following small function demonstrates how to fetch the caption for a column. You can use it to fetch the caption for the PK column of your object as the caption should be in the singular.

    So in your case, use UID_ADSGroup as column name when calling the function.

    Public Function SDG_GetColumnCaption(ByRef entity As IEntity, columnName As String) As String
        Return entity.GetDisplayName(Session, columnName).Translated
    End Function


Reply
  • The following small function demonstrates how to fetch the caption for a column. You can use it to fetch the caption for the PK column of your object as the caption should be in the singular.

    So in your case, use UID_ADSGroup as column name when calling the function.

    Public Function SDG_GetColumnCaption(ByRef entity As IEntity, columnName As String) As String
        Return entity.GetDisplayName(Session, columnName).Translated
    End Function


Children