Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Get the value from the field in the record that hasn't been saved

Posted on by 115

Hi, 

Usually i used this below code to retrieve value from field. 

Xrm.Page.getAttribute("fieldname").getValue();

I have a lookup field with addCustomView in it. The filter within XML query is based on field(field A and field B) in the form. The problem is, when the value in the field A and B is not saved to the db. The above code will return null value. I want to get the value from field A and B before it's saved to DB

*This post is locked for comments

  • FikriHailal Profile Picture
    FikriHailal 115 on at
    RE: Get the value from the field in the record that hasn't been saved

    Hi ravi.

    I place my query on the form onload. Then i realise that i should put the query on the changeevent of the field that i want to retrieve the value

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Get the value from the field in the record that hasn't been saved

    Hi,

    Xrm.Page.getAttribute("fieldname").getValue();   will return you the value of the field which is currently on the field. This doesn't return you db value.

    Please share more about your requirement/ problem.

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans