Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { XrmMockGenerator, ItemCollectionMock, StringControlMock, BooleanControlMock, LookupControlMock, } from 'xrm-mock';
- export const initForm = () => {
- const page = <Form.xcode_kreator_umowy_energii_elektrycznej.Main.Informacje>Xrm.Page;
- page.ui.tabs.forEach(x => {
- const sections = []
- debugger
- x.sections.forEach(section => {
- sections.push(XrmMockGenerator.Section.createSection(section.getName(), section.getLabel(), section.getVisible(), null, new ItemCollectionMock()))
- })
- XrmMockGenerator.Tab.createTab(x.getName(), x.getLabel(), x.getVisible(), x.getDisplayState(), null, sections);
- })
- page.ui.controls.forEach(x => {
- if (x instanceof StringControlMock) {
- XrmMockGenerator.Attribute.createString(x.getName(), null);
- }
- if (x instanceof BooleanControlMock) {
- XrmMockGenerator.Attribute.createBoolean(x.getName(), false);
- }
- if (x instanceof LookupControlMock) {
- XrmMockGenerator.Attribute.createLookup(x.getName(), null);
- }
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement