LIferay 7.4 Data provider only returning result for Default User.LIferay 7.4 Data provider only returning result for Default User.https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1215792662024-03-28T19:19:38Z2024-03-28T19:19:38ZRE: RE: LIferay 7.4 Data provider only returning result for Default User.Russell Bohlhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215934672022-12-02T19:28:28Z2022-12-02T13:21:11Z<p>Hi Gregory, I didn't write the data provider and likely can't help
troubleshoot it. I recommend taking the data provider from there,
looking at the code to understand what it's trying to do, then, if you
can't figure out why it's not working, write a separate and detailed
post about what you've tried and what's going wrong.</p>Russell Bohl2022-12-02T13:21:11ZRE: RE: LIferay 7.4 Data provider only returning result for Default User.Gregory Artisihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215934742022-12-01T22:42:08Z2022-12-01T15:26:25Z<p>hello, i tried to install this module but it doesnt work. the data
provider is visible and configurable but the form does not fill</p>Gregory Artisi2022-12-01T15:26:25ZRE: RE: LIferay 7.4 Data provider only returning result for Default User.Minhaj Ahmedhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215901142022-11-30T16:43:11Z2022-11-30T07:33:55Z<p>Thanks a lot for the reply. I will give it a try. Have a good one.</p>Minhaj Ahmed2022-11-30T07:33:55ZRE: LIferay 7.4 Data provider only returning result for Default User.Russell Bohlhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215866232022-11-29T16:11:19Z2022-11-29T01:59:46Z<p>Hi Minhaj, you've run into a known limitation with the REST Data
Provider. One option is to develop a custom data provider that's a bit
smarter. I think <a
href="https://github.com/liferay-forms/custom-data-provider">this
one</a> is actually doing what you want.</p>
<p>The recommended approach in 7.4 is likely to create an object
definition with the fields, then use fragments to set up the form
container and fields. I think there's a new Form Container fragment
that can help.</p>Russell Bohl2022-11-29T01:59:46ZLIferay 7.4 Data provider only returning result for Default User.Minhaj Ahmedhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215792652022-11-25T16:58:58Z2022-11-24T07:56:13Z<p>Hi,</p>
<p>I am trying to use data provider for a form in Liferay 7.4, where the
Name field will be autofilled by the name of current logged in user. I
have tried and tested the data providers with these to API</p>
<p>
<span class="RFZYhc">
<a class="oiM5sf"
href="http://localhost:8080/o/headless-admin-user/v1.0/my-user-account"
rel="noopener noreferrer" target="_blank">http://localhost:8080/o/headless-admin-user/v1.0/my-user-account</a></span></p>
<p>
<span class="RFZYhc">
<a class="oiM5sf"
href="http://localhost:8080/api/jsonws/user/get-current-user"
rel="noopener noreferrer" target="_blank">http://localhost:8080/api/jsonws/user/get-current-user</a></span></p>
<div class="Zc1Emd QIJiHb">In the data provider creation page USER Name
and Password field were left blank as we need use the data provider
for various logged in users.</div>
<div class="Zc1Emd QIJiHb"> </div>
<div class="Zc1Emd QIJiHb">Did get some error related to permission issue.</div>
<div class="Zc1Emd QIJiHb">So... 1) Granted view permission for users
for the data provider.</div>
<div class="Zc1Emd QIJiHb"> 2) Created service policy with
enable and default for com.liferay.portal.kernel.service.UserService.getCurrentUser.</div>
<div class="Zc1Emd QIJiHb"> </div>
<div class="Zc1Emd QIJiHb"> </div>
<div class="Zc1Emd QIJiHb">Now I am able to get the field prepopulated
through DATA Provider but it is only populating with information from
the Default account.</div>
<div class="Zc1Emd QIJiHb">I have tested with adding p_auth as a
parameter too still same result.</div>
<div class="Zc1Emd QIJiHb">If I add an account User Name and Password in
the Data Provider, form is being prepoluated with that user's
information not the current logged in user's.</div>
<div class="Zc1Emd QIJiHb"> </div>
<div class="Zc1Emd QIJiHb">Just wondering if anyone has comme across the
issue and what could be the possible solution? Thanks for reading.</div>
<div class="Zc1Emd QIJiHb"> </div>
<div class="Zc1Emd QIJiHb"> </div>
<div class="Zc1Emd QIJiHb"> </div>
<div class="Zc