[ExtensionOf(formDataSourcestr(ProjWorkBreakdownStructureV2,PSAActivityEstimates))] final class DT_PSAActivityEstimatesDK_Extension { /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> [FormDataSourceEventHandler(formDataSourceStr(ProjWorkBreakdownStructureV2, PSAActivityEstimates), FormDataSourceEventType::Activated)] public static void PSAActivityEstimates_OnActivated(FormDataSource sender, FormDataSourceEventArgs e) { //Getting formrun from sender to retrieve form controls FormRun formRun = sender.formRun(); //Retrieving Current record from data source PSAActivityEstimates pSAActivityEstimates = sender.cursor(); //Based on our condition we can perform our operations on //control. if (ProjWorkBreakdownStructureViewMode::Scheduling) { pSAActivityEstimates.object(fieldNum(pSAActivityEstimates, ProjectValue)).allowedit(false); } else if(ProjWorkBreakdownStructureViewMode::CostEstimates) { pSAActivityEstimates.object(fieldNum(pSAActivityEstimates, ProjectValue)).allowedit(true); } } }
[FormDataSourceEventHandler(formDataSourceStr(ProjWorkBreakdownStructureV2, PSAActivityEstimates), FormDataSourceEventType::Activated)] public static void PSAActivityEstimates_OnActivated(FormDataSource sender, FormDataSourceEventArgs e) { //Retrieving Current record from data source PSAActivityEstimates pSAActivityEstimates = sender.cursor(); boolean allowEditProjectValue = pSAActivityEstimates.TheField == ProjWorkBreakdownStructureViewMode::CostEstimates; pSAActivityEstimates.object(fieldNum(PSAActivityEstimates, ProjectValue)).allowEdit(allowEditProjectValue); }
PSAActivityEstimates pSAActivityEstimates = sender.cursor(); FormDataSource pSAActivityEstimates_ds ; boolean allowEditProjectValue = pSAActivityEstimates.ProjectValue== ProjWorkBreakdownStructureViewMode::CostEstimates; pSAActivityEstimates_ds.object(fieldNum(PSAActivityEstimates, ProjectValue)).allowEdit(allowEditProjectValue);
FormRun fr = sender.formRun(); FormDataSource pSAActivityEstimates_ds = fr.dataSource('PSAActivityEstimates'); PSAActivityEstimates pSAActivityEstimates = sender.cursor(); boolean allowEditProjectValue = ProjWorkBreakdownStructureViewMode::Scheduling; pSAActivityEstimates_ds.object(fieldNum(PSAActivityEstimates, ProjectValue)).allowEdit(allowEditProjectValue);
boolean allowEditProjectValue = ProjWorkBreakdownStructureViewMode::Scheduling;
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 Pallavi Phade as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 734 Super User 2025 Season 2
CA Neeraj Kumar 636
Martin Dráb 553 Most Valuable Professional