Open DiogoAlex opened 3 months ago
The obvious culprit of this issue is this If, but I'm not sure if you want to remove it?: https://github.com/khoait/DCE.PCF/blob/eede997c6a57778eae9b8f46dfc1f33a7d8f8abd/PolyLookupComponent/PolyLookup/components/PolyLookupControl.tsx#L484-L486
hi @DiogoAlex, thanks for reporting. I tested from my side again and everything is working as intended as follows:
Output selected field
is not configured, the control is not supported in Create form, and it should show the message Please save the form first
(from your screenshot, Team Distribution List
and Individual Distribution List
)Output selected field
is configured, the control is available in Create form, you can select lookup records, it should show the placeholder Select ...
, and the selected records should be outputted as json text in the Output Field. (the Related Accounts
in your screenshot)please note that, in model-driven app, we can't create associations/related records (N:N or 1:N), until the record is created first. You can see this behavior in any subgrid on the form, when you're in create form, the subgrid is read-only (in classic look) or hidden (in new look), you can't add anything to the subgrid until the form is saved.
the PolyLookup control tries to overcome this by saving the selected records as json objects to a field. but it won't associate the main record with the selected records when the form is saved, this job depends on the customizer/developer. you'll need to create some kind of logic to achieve this, it can be a cloud flow or a plugin. I have a sample plugin to deal with this scenario. Please see wiki here: https://github.com/khoait/DCE.PCF/wiki/PolyLookup#selected-items
hope it helps! cheers!
Component
PolyLookup v1.5.0
Describe the bug
I've created a PolyLookup using a NtoN relationship to the Accounts table. I've also recetly added an "Output Selected Field" because I needed the GUID of the selected Accounts to do some work on Javascript. But, something we noticed is that, when creating a new record the field is no longer being locked and saying "Please save the form first" and lets the users select the Accounts they want. Then, when the record is created those selected Accounts are deleted
Steps to Reproduce
Steps to reproduce the behavior:
Screenshots