Posts

Showing posts with the label ExpandoLocalServiceUtil

Getting the Expandovalue

We can use the "ExpandoLocalServiceUtil" to get the Expando or custom field value from the Object. Also we have another option to get expando value, Here we will use the ExpandoBridge to get the value details. Below example , using the user object to get the expando values. String attributeName = "interest"; ExpandoBridge expandoBridge = user.getExpandoBridge(); if(Validator.isNotNull(expandoBridge)) { String attr = (String) expandoBridge.getAttribute(attributeName); } Here we have the customfield name as " interest " and retrieving the value of that attribute. Note : But user should have permission to get the value.