@xrmforge/devkit 0.7.6 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/templates/AGENT.md +3 -2
- package/package.json +1 -1
package/dist/templates/AGENT.md
CHANGED
|
@@ -314,7 +314,7 @@ import { SaveMode, FormNotificationLevel, RequiredLevel, SubmitMode, DisplayStat
|
|
|
314
314
|
if (ctx.getEventArgs().getSaveMode() === SaveMode.AutoSave) { ... } // not === 70
|
|
315
315
|
|
|
316
316
|
// Form type (const enum from @types/xrm, works at runtime):
|
|
317
|
-
if (form.$context.ui.getFormType() ===
|
|
317
|
+
if (form.$context.ui.getFormType() === FormType.Create) { ... } // not === 1
|
|
318
318
|
|
|
319
319
|
// Display state:
|
|
320
320
|
if (tab.getDisplayState() === DisplayState.Expanded) { ... } // not === 'expanded'
|
|
@@ -357,7 +357,8 @@ Xrm.Navigation.openForm({ entityName: EntityNames.Account, entityId: id }); //
|
|
|
357
357
|
- Never magic numbers for OptionSet values, status codes, or FetchXML `<value>` (use OptionSet Enums)
|
|
358
358
|
- Never magic numbers for time calculations (use named constants like `MS_PER_DAY`)
|
|
359
359
|
- Never `getSaveMode() === 70` (use `SaveMode.AutoSave` from @xrmforge/helpers)
|
|
360
|
-
- Never `getFormType() === 1` (use `
|
|
360
|
+
- Never `getFormType() === 1` (use `FormType.Create` from `@xrmforge/helpers`)
|
|
361
|
+
- Never `XrmEnum.FormType` (does NOT exist at runtime, esbuild does not resolve const enums from .d.ts. Use `FormType` from `@xrmforge/helpers`)
|
|
361
362
|
- Never `'expanded'`/`'collapsed'` (use `DisplayState` from @xrmforge/helpers)
|
|
362
363
|
- Never `'ERROR'`/`'INFO'`/`'WARNING'` (use `FormNotificationLevel`)
|
|
363
364
|
- Never `'none'`/`'required'`/`'recommended'` (use `RequiredLevel`)
|