hello experts, As the title clearly states, I am trying to pass some fields of opportunity to another entity.
the flow would be the following: - I am looking for a new opportunity in the contract entity. - when selecting the opportunity I am charged some fields that already exist in the opportunity any answer would be very helpful. Thank you
*This post is locked for comments
Hi,
In addition to that you can look for this sample here: http://himbap.com/blog/?p=2874 here I am implementing similary type of requirement.
What I understand from your question that when you select any opportunity in the lookup you want to get some value from selected opportuity and set to same value in contract entity.
If my understanding is correct , you need to write a js function which will fire onchange of lookup.
In the javascript function create Web api request which will retrieve the opportunity data and on success of web api get the data and set value to contract entity field.
So download the CRMRestBuilder and make a query
You can get help from here how to create webapi request.
www.toplinestrategies.com/.../crm-rest-builder-useful-tool-working-crm-2016’s-web-api
goutamdascrm.wordpress.com/.../why-dynamics-365-web-api
Let me know if you have any query.
We're all started from something. Here is article that describes attributes - msdn.microsoft.com/.../gg334409.aspx
Only using Xrm.Page.getAttribute ("<field name>"). SetValue (new field value); I can work?
Sorry but I've been working with crm for a short time
If you want to use JS you should build proper query and CrmRestBuilder (just google it) can help you to do it and using Xrm.Page.getAttribute("<field name>").setValue(new field value); you can set values from related opportunity. Good luck.
Hello, thanks for answering.
How could I do it with javascript?
regards
Hello Camilo,
If you don't want to write code you can use real time workflow to populate mentioned fields. The only downside of this that values will be shown after record is saved.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156