Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, Power Apps, Power Automate, and Excel are powering major transformations around the globe. | View Gallery
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 facing a weird issue in mandatory fields.
Let me explain my scenario, I have created a table(consider TableA) with totally 8 fields out of which 4 fields(Consider as Field1, Filed2, Field3, Field4) I set the property mandatory as "Yes" ( I understood the functionality of this property , if we set this property as yes , it will through a warning like that field must filled in and stops execution )
I have created a form (consider form name TableAForm)
Added all the fields in the form , as expected if (Field 1, Field 2 ,Field 3, Field 4) is not filled showing warning and stops execution but in combination of (Field 3, Field 4) if it not filled its not showing any warning as expected and executes the process. Its very weird. In all other combination say if field 1 is not filled showing warning as expected or if field 1, field 3 is not filled showing warning as expected and stops execution.
This issue happening only when combination of (Field 3 , Field 4) is not filled , its not showing any warning and process the execution.
To check this I created ValidateWrite method both in table & form and put breakpoint there , in all other combination its hitting the validateWrite method and returning ret = false, but as I mentioned above my case combination (Field 3, Field 4) not filled its not even hitting validateWrite method. I am confused.
I tried deleting fields and add again both in table and form level , no help.
If any one know some solution , kindly help me out.
Thanks in Advance
Mohammed Shameer S
If this is happening in a development environment, make sure a full build will end successfully without errors. Also perform a database sync.
I customized the operation according to your situation.
When a table is created normally, fields are added, and the "mandatory" property is changed to Yes to save the data, any combination will prompt that it is not filled.
However, when I change the "Save Contents" attribute of a field to No and do not fill it in, I will normally save the data of other fields and will not prompt this field to be a required field.
So, are you likely to misoperate when modifying attributes?Or, do you find any other abnormalities?
Thanks for reply.
I did complete build and complete sync no help.
Thanks and regards,
Mohammed shameer S
Hi Blue Wang,
Thanks for reply
In my case Save contents attribute was set to "Yes" ,but still as mentioned previously only for those combinations no prompt is coming and executes the process.
Kindly suggest some other solution.
What are data types of your fields?
Isn't there any code interfering with the standard validation?
When you say "process execution", do you mean "saving the record"?
Field 3, Field 4 (both string fields ) it has relation with some other table , i checked related table values also it contains values (i.e, there is no empty value present in that table)
No code interfering with standard validations , i just made the mandatory property as YES and trying to achieve it.
Yeah i am trying to say without showing any prompt as warning its inserting data into respective table( As per standard if field is mandatory its should show warning prompt and it will not insert any data into table)
This problem is happening only in that particular combination as i explained( only when Field 3, Field 4 ) not filled , other than this combination its working fine
Kindly help me in finding a solution for this issue.
Thanks in advance,
Mohammed shameer S
Do you modify the fields from code?
For example if field1 is modified by user, then field2 get's cleared.
I think that if the field is cleared from code the standard "mandatory" validation is bypassed.
Does the record really get inserted, even if mandatory fields are missing?
The Mandatory validation is never bypassed, no matter if the data is creted from a form or code.
Maybe the real issue is in your "process"? Could you tell us more what do you mean by "its not showing any warning and process the execution." Maybe you call your process in a wrong place? If you need to start some processing only after all fields are filled and the record is inserted, you should check if the record really was succesfully inserted before starting your process.
Could you share more details on what do you mean by the "process", and how you call that process?
Hi Pete Alberts,
Nope, fields were entered by user only .It was not modified through any code .
Here "Process" means I am referring that value is inserted as blank even if that field is given as mandatory in table level. and as I previously mentioned this issue is not happening in all cases, its happening only when Field 3 and Field 4(both set mandatory "Yes" in table level) not filled .
If a field is set as mandatory "Yes" in table , if we not filled the value it will show a warning message as "Field 'Field 3' must be filled in" I am trying to say this is not happening , only when Field 3 and Field 4 are not filled . In all other cases for example if i not filled field 1 and field 2 it showing warning prompt as " Field 1 and Field 2 must be filled in" one after one , issue is only with those field 3 and field 4 .
Hope you understand my problem
Thanks in Advance.
So you are saying that the record gets inserted even if some mandatory field is missing? It should not happen.
Could you please share a screenshot where we see the Mandatory property of these four fields, and a record in Table browser where we could see that some of the mandatory fields is empty?
Business Applications communities