Hi everyone,
Thank you for your responses. I'd like to provide further clarification on the requirement, as the suggested solutions may not be applicable in the current scenario.
The requirement entails adding a checkbox in the header form of the Counting journal to disable both the header and details sections. This disabling should occur when updates are made from an external system through integration, rather than by end users.
I have implemented my current code in the Active DataSource method using the Chain of Command (COC) approach.
However, the current approach faces challenges due to specific methods in the Counting Journal form, such as "InitBlock," which maintain the form's enablement unless specific restrictions like "block by user" or "block by system" are applied.
Considering this, I am contemplating updating the "block by system" field in the database to restrict the DataSources for this form. However, this approach deviates from system standardization, especially if the form remains enabled when the customized checkbox is checked.
Therefore, I am considering an alternative solution: preserving the value of "block by system" in another field until the process is completed. Subsequently, I will uncheck the customized checkbox to restore the "block by system" to its original value before the update.
This approach aims to ensure adherence to system standards while effectively managing the form's enablement based on the requirements.
Please let me know if you have any other suggestions.
public void init()
{
Param param = Param::find();
next init();
yourdatasource_ds.AllowEdit(param.CheckBox);
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156