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 have added a custom field "PRODUCTION TIME" on Report as Finished form "ProdParmReportFinished". This control is not datasource bound. I want to take the value of this control when the user clicks ok button. And use this value in a class which is outside scope " jmgJobBundle" and "JmgRegistrationForm".
User enters 100.00 in custom control Production Time and clicks OK.
Now I have to take that production Time Value and use it to create a route card for Production Order. This is the requirement.
THE ISSUE - I'm not able to move the value of the control from the form to out of scope classes. Can you please give me some suggestions what can be done to achieve this functionality ? I don't prefer adding a regular table to store values because that will require maintenance etc. Perhaps using args ?
What do you mean by "out of scope classes"? Objects that don't exist yet or not anymore? Or that you don't know how to get a reference to the object you need?
Hi Martin -
The best way I can explain is that fo example when I use a temp table to store the value of the control on the OK button clicked(). the value is first stored in the temp table which I can see in the debugger but as soon the code is gone out of the clicked method and on to the other classes the temp table buffer is empty with no records. to me this means that the temp table is now in the out of scope class. So my question is how do I move the forms control value to the class which does not exist in the debugger path yet. I hope this gives you an idea of my issue.
I can also say yes to you question "Objects that don't exist yet ?"
Simple web search could give you ways to solve your problem
Your post is about passing the value from a class to forms data source. I need to pass the value from a form unbound control field to a class. It is the other way around. Will your post still work for this scenario ?
Yes it's a other way around . I just gave you it for reference . You can use similar process to pass it from form to class.
It seems you don't understand the difference between classes and objects. Classes are mere definitions of how objects will look like - what data they can hold and how they behave. Objects are concrete instances with concrete data (state).
If you create an object and you want to work with it somewhere else, you must pass a reference to this particular object to the place where you need it. If you create a new object, you won't see the data of other objects created from the same class, because they are completely independent.
Business Applications communities