AddAddress liferay 7.4 not workingAddAddress liferay 7.4 not workinghttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1215277752024-03-28T08:33:56Z2024-03-28T08:33:56ZAddAddress liferay 7.4 not workingPietro Paganihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215277742022-10-03T14:06:15Z2022-10-03T08:44:45Z<p>Hello,</p>
<p>i'm trying to add an address for a user with liferay 7.4 with the
method :</p>
<pre>
addressLocalService.addAddress(referenceCode, adminUser.getUserId(), Contact.class.getName(), user.getContactId(),"","", streetUser, "", "", cityUser, zipUser, 21208, 21185, 11000, false, true, phoneUser, serviceContext);
</pre>
<p>The problem is that i receive a message <strong>No User exists with
the primary key 0 </strong></p>
<p>i did this before to have an admin user that can addAddress:</p>
<p>adminUser = UserLocalServiceUtil.getUserByScreenName(companyId,
"job-admin"); PermissionChecker checker =
PermissionCheckerFactoryUtil.create(adminUser); PermissionThreadLocal.setPermissionChecker(checker);</p>
<p>What could be the problem?