Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend link field to optionally select foreign field #262

Closed
hi-ko opened this issue Oct 7, 2016 · 2 comments
Closed

extend link field to optionally select foreign field #262

hi-ko opened this issue Oct 7, 2016 · 2 comments

Comments

@hi-ko
Copy link
Contributor

hi-ko commented Oct 7, 2016

By now a link fields (link, linkMultiple, linkParent) show hard coded the "name" field of the referenced entity. Sometimes the name field may not be very helpful and should be replaced by a different field (e.g. the case number instead of the case name).

Example config using an optional field attribute to show e.g. field "number" instead of "name":

"fields" : {
    "caseTest" : {
        "type" : "link",
        "field" : "number"
    }
},
"links" : {
    "caseTest" : {
        "type" : "belongsTo",
        "foreign" : "tasksTest",
        "entity" : "Case"
    }
}

http://forum.espocrm.com/forum/developer-help/24169-alternative-foreign-field-for-link-field

@yurikuzn
Copy link
Contributor

yurikuzn commented Mar 17, 2017

For belongsTo relations will be added in 4.6.0.

Paremeters foreignName to specify custom field and noForeignName to skip name field creation.

@yurikuzn yurikuzn closed this as completed Jan 7, 2024
@RabeeBrahimi
Copy link

noForeignName is this still available as parameter. Couldn't find anything on the schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants