Announcements
No record found.
[FormControlEventHandler(formControlStr(JmgParameters, ViolationPenalties_PenaltyCode), FormControlEventType::Modified)] public static void ViolationPenalties_PenaltyCode_OnModified(FormControl sender, FormControlEventArgs e) { PenaltyType penaltyType = PenaltyTypes::find(sender.valueStr()).PenaltyType; FormRun formRun = sender.formRun(); FormControl cntrol = formRun.design().controlName("ViolationPenalties_Penalty"); if (penaltyType == PenaltyType::Warning) { if (cntrol) { cntrol.enabled(true); } } else { if (cntrol) { cntrol.enabled(false); } } }
Thanks, Layan Jweihan Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future.
[FormDataSourceEventHandler(formDataSourceStr(JmgParameters, ViolationPenalties), FormDataSourceEventType::Activated)] public static void ViolationPenalties_OnActivated(FormDataSource sender, FormDataSourceEventArgs e) { ViolationPenalties currentRecord = sender.cursor() as ViolationPenalties; if (currentRecord) { if (PenaltyTypes::findByRecid(currentRecord.PenaltyTypesReferenceGroup).PenaltyType == PenaltyType::Warning) { sender.object(fieldNum(ViolationPenalties, Penalty)).allowEdit(true); } else { sender.object(fieldNum(ViolationPenalties, Penalty)).allowEdit(false); } } }
Hello @Layan Jwei,
I have already sent an email to the community support team three days ago, but no one has responded. So, if possible, please mark your answer as Verified.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 653
André Arnaud de Cal... 493 Super User 2026 Season 1
Syed Haris Shah 317 Super User 2026 Season 1