--- title: "Editing Schedule Work Order Numbers" slug: "editing-schedule-work-order-numbers" updated: 2026-10-27T23:12:43Z published: 2026-10-27T23:12:43Z canonical: "ims-handbook.cenosco.com/editing-schedule-work-order-numbers" --- > ## Documentation Index > Fetch the complete documentation index at: https://ims-handbook.cenosco.com/llms.txt > Use this file to discover all available pages before exploring further. # Editing Schedule Work Order Numbers Required PEI User roles for below: INSP WO SPEC, INSP CLERK/A, INSP GENERAL, or INSP ADMIN. Civil currently does not support editing CMMS Work Order Number. Schedule *Notification Number* and *CMMS Work Order Number* can both be freely edited if the *SAP Interface Active* application setting has *BValue* set to 0. ![](https://cdn.document360.io/e492a0e0-a4ba-4aca-8fc6-76b95f91fdf3/Images/Documentation/image-1716442920698.png?sv=2026-02-06&spr=https&st=2026-10-28T14%3A35%3A39Z&se=2026-10-28T15%3A35%3A39Z&sr=c&sp=r&sig=lFVakix3mNzjyu%2BIVe92cuVjYxgIuQFY60BWmdtNsok%3D) If *SAP Interface Active BValue* is set to 1 and *Allow Schedule SAP Work Order Number BValue* is set to 0, editing of number won’t be possible. ![](https://cdn.document360.io/e492a0e0-a4ba-4aca-8fc6-76b95f91fdf3/Images/Documentation/image-8NUBASRO.png?sv=2026-02-06&spr=https&st=2026-10-28T14%3A35%3A39Z&se=2026-10-28T15%3A35%3A39Z&sr=c&sp=r&sig=lFVakix3mNzjyu%2BIVe92cuVjYxgIuQFY60BWmdtNsok%3D) If *SAP Interface Active BValue* is set to 1 and *Allow Schedule SAP Work Order Number BValue* is set to 1, then only *CMMS Work Order Number* is editable and it requires validation (it is no longer a free text input) and only on CAIR schedules in DRAFT. ![](https://cdn.document360.io/e492a0e0-a4ba-4aca-8fc6-76b95f91fdf3/Images/Documentation/image-Z16F4ZJD.png?sv=2026-02-06&spr=https&st=2026-10-28T14%3A35%3A39Z&se=2026-10-28T15%3A35%3A39Z&sr=c&sp=r&sig=lFVakix3mNzjyu%2BIVe92cuVjYxgIuQFY60BWmdtNsok%3D) ```javascript [Workflows.WorkflowMethod] public static bool CanEditScheduleSAPOrderNr(DomainRepoBase domainRepo, DC.IPDescriptable ipd) { if (!ApplicationSettingsCache.SapInterfaceActive(domainRepo)) { return true; } if (!ApplicationSettingsCache.AllowScheduleSAPWONrUpdate(domainRepo as ISharedRepo) || !(ipd is Schedule schedule)) { return false; } if (ThreadData.Current.Dict.GetValue(AppCore.StringConstants.IgnoreMethodology) || schedule.IsNew) { return true; } var cairInDraft = domainRepo.GetRepository().AsNoTracking() .Where(x => x.ScheduleId == schedule.DBRef) .Where(x => x.InspectionEvent1.InspectionApprovalStatus.Name_Enum == "DRAFT") .Where(x => x.InspectionType.Name_Enum == "CAIR") .Any(); return cairInDraft; } ``` ```sql -- can schedule notification / work order number be edited? select s.ScheduleId, s.Name, s.SAPNotificationNumber as [Notification Number], s.SAPOrderNbr as [CMMS Work Order Number], SAPInterfaceActive.BValue, SAPWONumberUpdate.BValue, CanEditScheduleSAPOrderNr from Schedule as s left join ApplicationSettings as SAPInterfaceActive on SAPInterfaceActive.Name_Enum = 'SAPINTERFACE_ACTIVE' left join ApplicationSettings as SAPWONumberUpdate on SAPWONumberUpdate.Name_Enum = 'ALLOW_SCHEDULE_SAPWONUMBER_UPDATE' inner join InspectionEvent as ie on ie.InspectionEventId = s.CurrentInspectionEventId inner join InspectionApprovalStatus as ias on ias.InspectionApprovalStatusId = ie.inspectionApprovalStatusId inner join InspectionType as it on it.InspectionTypeId = s.InspectionTypeId cross apply ( select case when coalesce(SAPInterfaceActive.BValue, 0) = 0 then 1 -- "SAP Interface Active" application setting when coalesce(SAPWONumberUpdate.BValue, 0) = 0 then 0 -- "Allow Schedule SAP Work Order Number" application setting -- if (ThreadData.Current.Dict.GetValue(AppCore.StringConstants.IgnoreMethodology) || schedule.IsNew) -- ??? when ias.Name_Enum = 'DRAFT' and it.Name_Enum = 'CAIR' then 1 -- DRAFT CAIR else 0 end as CanEditScheduleSAPOrderNr ) as r where s.ScheduleId = 1188749 ```