Breaking news from around the world
Get the Bing + MSN extension
Answer forum questions for a chance to win prizesProviding verified answers in the community not only helps your colleagues find solutions, it also earns community members badges and spots on the Top 10 Leaderboards. Starting this month, your verified answers can help you earn a chance to win monthly prizes.
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | View virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
I am setting up a lookup field value using jquery in this way on portal form.
$("#new_country_name").attr("value",countryName); $("#new_country").attr("value",responseVal.new_countryid.id); $("#new_country_entityname").attr("value","new_country");
I am getting the country details from country lookup entity using odata query. This part is working fine as I can see the country name populating on form load.
The problem is when I save the portal form with all the values entered in the fields along with this populated lookup field, everything gets saved except for this lookup field value.
What could be the issue. Am I setting up the lookup field correctly(above)? Please guide me through this.
Thanks for any help!
1.After you set the lookup field value with Jquery, please press F12 and open development tools to check that the field is properly assigned.
2. If the field is set value successfully, so there may be something wrong with your save function or the display functions of portal form. You could go to CRM client to check if the lookup field has been updated correctly.
Hope it helps.
After execution of the above script, do you see the value populated onthe lookup field?
Yes, Ravi. I can see the value populated in the lookup field.
It just won't get saved. Thanks.
Thanks Leo, figured what the problem is.
I was incorrectly setting up the lookup field id.
This fixed it.
Thanks for sharing the fix here :)
Thanks for sharing your solution here!
Have a nice day.
Business Applications communities