How to validate field on subform from main form?

Chowdary
Member Posts: 148
Hi All
I got to validate a field on the Service Order subform when I validate Assigned userID field on the Service Order form. I have used CurrForm.ServItemLines.FORM.Update(); and it's working but didn't solve my problem, meaning I am not getting the effect as I am getting with manual validation on subform. The main requirement is when I manually validate Assigned userID on the main form some code is executed and created Service Header record some where in the system and like wise Service Item Line record for manual validation on the subform. But I need to skip manual validation on the subform and when I validate Assigned user ID on the main form it should first validate and create Service Header record and then it shud validate subform (with no manual validation) and create Service Item Line record.
Hope I made it clear, please share ideas
Thank You everyone
Chowdary
I got to validate a field on the Service Order subform when I validate Assigned userID field on the Service Order form. I have used CurrForm.ServItemLines.FORM.Update(); and it's working but didn't solve my problem, meaning I am not getting the effect as I am getting with manual validation on subform. The main requirement is when I manually validate Assigned userID on the main form some code is executed and created Service Header record some where in the system and like wise Service Item Line record for manual validation on the subform. But I need to skip manual validation on the subform and when I validate Assigned user ID on the main form it should first validate and create Service Header record and then it shud validate subform (with no manual validation) and create Service Item Line record.
Hope I made it clear, please share ideas
Thank You everyone
Chowdary
Pleasure in the job puts perfection in the work
0
Comments
-
Hope I am getting it right, Chowdary.
So I guess you are writing code to get this done. Validating any field is done by using the VALIDATE method.
Calling CurrForm.ServItemLines.FORM.Update() will only update and not validate. So you have to write code that explicitly will validate the relevant fields on the service item line table. Typically the statement would beServiceItemLine.VALIDATE(<field name>,<new field value>);
0 -
lvanvugt wrote:Hope I am getting it right, Chowdary.
So I guess you are writing code to get this done. Validating any field is done by using the VALIDATE method.
Calling CurrForm.ServItemLines.FORM.Update() will only update and not validate. So you have to write code that explicitly will validate the relevant fields on the service item line table. Typically the statement would beServiceItemLine.VALIDATE(<field name>,<new field value>);
Thanks for the response lvanvugt
I have tried VALIDATE too, but my requirement is related to change log entry. Until unless I went to subform and change the value manually the change is not effecting. Is there amy way to replace manual functionality with code?
Thank YouPleasure in the job puts perfection in the work0 -
Hi,
You have to write a Function in Subform like Fct_UpdateCtrl()
//In Subform
Fct_UpdateCtrl()
{
CurrForm.UPDATE;
}
and call this method from Onvalidate() of Header Form Field Assigned user
CurrForm.SubForm.FORM.Fct_UpdateCtrl;
It will work as manuall
Thanks & Regards
Ajageavi Nath Keshari0 -
AjageaviKeshari wrote:Hi,
You have to write a Function in Subform like Fct_UpdateCtrl()
//In Subform
Fct_UpdateCtrl()
{
CurrForm.UPDATE;
}
and call this method from Onvalidate() of Header Form Field Assigned user
CurrForm.SubForm.FORM.Fct_UpdateCtrl;
It will work as manuall
Hi AjageaviKeshari
Thanks for the response, the solution you provided was tried before posting here. If you can see on this post I have mensioned that.
But, I have found a link that suits my requirement
http://jeremy.vyska.info/2011/04/cal-mo ... ge-log/144
This is creating the line on the changelog from Service Order subform, I'm working basis of this link. If anyone has any ideas please let me know. I will update as soon as I get resolved with this issue
Thank YOuPleasure in the job puts perfection in the work0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions