Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Answered

Null value for Customer Datatype

Posted on by Microsoft Employee

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

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,962 Moderator on at
    RE: Null value for Customer Datatype

    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/

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Null value for Customer Datatype

    Hi Niku123,

    I got it now.

    You can check relationship mapping or business rule or js.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Null value for Customer Datatype

    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

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Null value for Customer Datatype

    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:

    pastedimage1639557118095v1.png

    But what "keeping existing selected value earlier for editing?" is meaning for?

    It can show recent records by default:

    pastedimage1639557439771v2.png

    Ensure the 'turn off automatic resolutions in the field' and 'Disable most recently used items for this field' options are unchecked.

    pastedimage1639557737091v3.png

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Null value for Customer Datatype

    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

  • Verified answer
    Guido Preite Profile Picture
    Guido Preite 54,063 Moderator on at
    RE: Null value for Customer Datatype

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans