Announcements
Hi,
As one knows, D365 has newly introduced datatype as Customer for lookup to either Account or Contact on a custom field of another entity, question is can it hold a blank/null value when the form is loaded for Create record and keeping existing selected value earlier for editing?
Any thoughts?
Thanks
Nikhil
Hi,
Your question is unclear. Can you please elaborate in detail.
For New create record, customer lookup field will be blank only.
For Edit/Update record, Customer lookup will show existing selected value.
formContext.getAttribute("field logical name").setValue(null); - This will set the lookup field with null/blankvalue.
Please mark my answer verified if this is helpful!
Regards,
Bipin Kumar
Follow my Blog: xrmdynamicscrm.wordpress.com/
Hi Niku123,
I got it now.
You can check relationship mapping or business rule or js.
Hi Leah,
Let me explain, I've a contact entity with xyz value, ok?
I've Consent entity which is related to Contact.
Consent entity has two fields of Customer datatype or lookup which are Client and Who.
Why does Client and Who fields of consent entity hold value of parent contact and not blank to begin with?
I'm not sure since I tried by inserting similar field and it was showing blank so issue is elsewhere or mapping.
Thanks for your help.
Regards
Nikhil
Hi Niku123,
I can understand "hold a blank/null value when the form is loaded for Create record"
The customer field is null in the new creating record:
But what "keeping existing selected value earlier for editing?" is meaning for?
It can show recent records by default:
Ensure the 'turn off automatic resolutions in the field' and 'Disable most recently used items for this field' options are unchecked.
Never Mind Guido, thanks for your reply.
I am still not sure why blank or null value is not displayed inside that lookup which was of Customer datatype, it was showing related contact in that field, could be a mapping issue.
I tried by inserting similar kind of field and it was showing blank to begin with.
I managed to workaround with JS by pro-grammatically setting up as null.
Marking this thread as closed by verifying your answer.
Thanks
Nikhil
I didn't understand completely your question, but customer type because it's a lookup can hold null value (so inside UI it will be shown as empty)
hope it helps
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156