added a button post on form when post button is clicked all field should be non editable and is posted becomes yes
Hi Sachin Mittal,
You can add your logic on the clicked method of the Post button. Make the DataSource editable or non-editable by adding code on active method of the DataSource using the field Posted status.
public void clicked() { super(); DataSourceName_ds.allowEdit(false); DataSourceName.PostStatus = PostStatus::Posted; DatasourceName_ds.research(); }
Thanks,
Girish S.
Hi Sachin, on clicked method of post, you can update Is posed field to yes and datasource.allowEdit to No.
Override active method of datasource and allowEdit based on Is posted value. So if record is not posted, fields are editable. Also, if I may suggest, you can disable post button based on Is posted value.
www.dynamicsuser.net/.../50020
yes it should also be done , post button should be disables for posted ones , what can be code for that?
You can add your logic on the active method of the form datasource.
public int active() { int ret; ret = super(); if(DatasourceName.PostedStatus == PostedStatus::Posted) { DataSourceName_ds.allowEdit(false); } else { DataSourceName_ds.allowEdit(true); }
no it like , when enum value is yes , post button should also be disabled
For post button, you can set AutoDeclaration of button to yes and in active method use
PostButton.enabled(true) or false in the same code where you are going to check if is posted is yes or No in the active method of form datasource as well in post clicked method.
You can set the auto declaration property of the Post button to Yes and add that control enable property to no or yes on the active method.
public int active() { int ret; ret = super(); if(DatasourceName.PostedStatus == PostedStatus::Posted) { DataSourceName_ds.allowEdit(false); PostButtonName.enabled(false); } else { DataSourceName_ds.allowEdit(true); PostButtonName.enabled(true); } }
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 683 Most Valuable Professional
André Arnaud de Cal... 563 Super User 2025 Season 2
Sohaib Cheema 398 User Group Leader