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
AddAddress liferay 7.4 not working
Hello,
i'm trying to add an address for a user with liferay 7.4 with the method :
addressLocalService.addAddress(referenceCode, adminUser.getUserId(), Contact.class.getName(), user.getContactId(),"","", streetUser, "", "", cityUser, zipUser, 21208, 21185, 11000, false, true, phoneUser, serviceContext);
The problem is that i receive a message No User exists with the primary key 0
i did this before to have an admin user that can addAddress:
adminUser = UserLocalServiceUtil.getUserByScreenName(companyId, "job-admin"); PermissionChecker checker = PermissionCheckerFactoryUtil.create(adminUser); PermissionThreadLocal.setPermissionChecker(checker);
What could be the problem?
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™