web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

System wrongly autofill in a field

(0) ShareShare
ReportReport
Posted on by 10

Hello,

I have a problem on my appointment form. 

I created a field in which the user can fill in the name of a contact. I won't go into the details of why I need this contact field but I have cases when there is an appointment that will take place with a contact named "A", but I need the contact "B" to be in this special contact field.

My problem: when I create an appointment directly from a contact form (contact "A"), the system autofills in, with contact "A" : 

- the field "Concerning", which is good

- another field to send the invitation which is good

but it also fills in my special contact field, which is not good ! 

How should I desactivate this last autocompletion, keeping the 2 others? 

I hope I am clear enough. Please let me know if I should rephrase my request. 

Thanks

Best regards, 

V.

I have the same question (0)
  • Pankaj Gogoi Profile Picture
    3,177 on at

    Hi Victor,

    What type of field is that? Is it a look up field.

    Best Regards

    PG

  • jonathanbrookes Profile Picture
    10 on at

    Hello,

    Yes it is !

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Hi,

    Its an expected behavior. When you create a lookup field from an entity - it adds a relationship mapping to that relationship between those two entities.

    so if you have two lookup fields from contact - they will be auto filled when you create record from contact.

    You have to write a javascript to clear the other field or a simple business rule should work.

    if you want to restrict your business rule be on only create form only you can do something like this:

    if createdon - does not contain data

    then clear the contact B field.

    or you can even say 

    if contact A contains data

    clear contact B.

  • Pankaj Gogoi Profile Picture
    3,177 on at

    So it's a look up field of probably customer data type. It will populate either the Contact or Account record when you create an appointment.

    You can create a lookup field to Contact entity only. Or you can create a JS function or Business Rules to clear the value on load of the form.

    Best Regards

    PG

  • Suggested answer
    LuHao Profile Picture
    40,892 on at

    Hi partner,

    As stated in the answers above, this is expected behavior.

    When there are multiple contact lookup fields on the appointment form, these lookup fields will be mapped at the same time.

    E.g, I have two Contact lookup fields on the Appointment form, when I create an Appointment form the Contact, both Contact lookup fields will have the same value.

    pastedimage1599203533777v4.png        pastedimage1599203513280v3.png

    Therefore, we cannot realize that only some fields are mapped while others are not mapped.

    We can only clear the values of fields that do not need to be mapped through business rules or Javascript.

    Since business rules are not available on the quick create form, we have to use Javascript.

    Open the Appointment quick create form editor, click Form Properties.

    pastedimage1599204159579v5.png

    Add a form library.

    pastedimage1599204214462v6.png

    New.

    pastedimage1599204241061v7.png

    Click Text Editor.

    pastedimage1599204295968v8.png

    Type the source as follow.

    function clearvalue() {
    
        Xrm.Page.getAttribute("new_contactb").setValue(null);
               
    }

    Save and publish. Add the new library.

    Add an event.

    pastedimage1599204537227v9.png

    Type the function name and check "Pass execution context as first parameter".

    pastedimage1599204590857v10.png

    Save and publish the form.

    In this way, the field value will be cleared when create an Appointment form the Contact.

    pastedimage1599204745928v1.png

  • LuHao Profile Picture
    40,892 on at

    Hi partner,

    Has your problem been solved?

    Please don't forget to click Yes under "Did this answer your question?" to close this thread.

    Thanks.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 74

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans