You need to sign in to do that
Don't have an account?
Raghu.2020
Get Object icon in lwc
I'm trying to display the current object icon in my lwc. Any ideas?
Example:
Example:
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Do you see any error in the browser console?
If not, you can try approachof using
lightning/uiObjectInfoApi
to get the icon information for any custom object, following is pseudo code for Account object:To display dynamic icon URL, you can try
themeInfo
ofuiObjectInfoApi.
Reference: https://salesforce.stackexchange.com/questions/268249/soql-query-or-other-means-to-get-the-icon-assigned-to-an-object
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Thanks for your reply. I will check this and get back.
I tried the below and was able to get it dynamically for standard and Custom objects.
JS:
HTML:
Apex Controller: