Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
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 and Operations TechTalks | Customer Engagement TechTalks | Talent 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