Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Probleme with lookup value

Posted on by 90

Hello ,

I have a probleme with my lookup that I put in that a value but when I clique on Save button  the value in lookup desapear but when I refresh the page the old value is return to the lookup.

The probleme is show in the pictures in the pictures below.

Thank's

before-saving.PNG

when-saving.PNG

afterrefreshing.PNG

*This post is locked for comments

  • Suggested answer
    Temmy Wahyu Raharjo Profile Picture
    Temmy Wahyu Raharjo 2,914 on at
    RE: Probleme with lookup value

    I think this one happened because of one of your Javascript function clear this one. Try to disabled first all the function that has changes to this lookup. I'm sure this one Javascript function because when you refresh, it will tap back the record.

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Probleme with lookup value

    My bad, if you are talking about contact not the motif field, I just acted insane :) sorry.

    Contact lookup - if this clearing on change to some value & save, there may be some asynchronous update plugin/workflow which is erroring out & hence rolling back the transaction behind the screen.

  • feninzie Profile Picture
    feninzie 90 on at
    RE: Probleme with lookup value

    I'm sure that's a lookup that's why I get all the contact related the account selected but when I save the value is disapear from the lookup but when i refresh the page i realy get the value seleted before the save.

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Probleme with lookup value

    First of all, this is not lookup control but a picklist. Also it seems like a custom component or some DOM manipulation as the mandatory mark (*) appears in front of label unlike other attributes.

    Verify if you have an onchange event associated with that attribute & debug it to see what’s really going on.

    There may be some hidden attribute to store & retrieve back on form load, failing to do so will behave this way.

    Verify if some JavaScript is doing removeOption, addOption on the fly wrt this attribute.

  • Gopalan Bhuvanesh Profile Picture
    Gopalan Bhuvanesh 11,397 on at
    RE: Probleme with lookup value

    Hi

    You do not need to use the above JavaScript code unless otherwise you are setting the field value using JavaScript.

    Please check whether workflow, plugin, business rule (any scope) or custom JavaScript code set value to this field. I do not think this is related to caching.

  • feninzie Profile Picture
    feninzie 90 on at
    RE: Probleme with lookup value

    I put the setSubmitMode  on the lookup in load and onSave but I get the same error :(

  • gdas Profile Picture
    gdas 50,085 on at
    RE: Probleme with lookup value

    Hi,

    Set field property setsubmitmode= always in the onload or before save the  form.

        Xrm.Page.getAttribute("LookupFieldName").setSubmitMode("always"); 
    

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans