Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Unable to show User's Phone Number in User contact Section
I have a problem while adding phone number, I successfully added phone to Phone table but unable to view on front Contact section of User
long userId=user.getUserId();
long classPk=(user != null
? user.getUserId() : 0);
String
className="com.liferay.portal.kernel.model.Contact";
phone=ParamUtil.getString(actionRequest,
"Phone");
PhoneLocalServiceUtil.addPhone(userId, className, classPk, phone,
"302",11011, false, serviceContext);
Hi ,
classsPK need to be contact Id , as in your case your passing userId , Pls try with sending contactId for classPK .
@mohammad Umair can you please tell what are parameters after phone number what is typeId and extension
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™