Notifications
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 592 Most Valuable Professional
André Arnaud de Cal... 478 Super User 2025 Season 2
BillurSamdancioglu 305 Most Valuable Professional