Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Error when generating master-detail #11019


User avatar
1
m.cseiu05 created
  • What is your product version: v11.1.0
  • What is your product type (Angular or MVC): ASP.NET CORE & Angular
  • What is product framework type: .net core

I am trying to create a master detail. After generating detail, when I am trying to generate master using RAD tool, I am getting the error: An error occured. : Specified argument was out of the range of valid values. Parameter name: startIndex

After closing the solution, I am trying to regenarate the master entity, I am getting the error this time after the line Starting to create child table items for ... An error occured. : Object reference not set to an instance of an object.

Here is my master entity json file:

{
  "IsRegenerate": true,
  "MenuPosition": "main",
  "RelativeNamespace": "SCM.SCMRequisitions",
  "EntityName": "SCMRequisition",
  "EntityNamePlural": "SCMRequisitions",
  "TableName": "SCMRequisitions",
  "PrimaryKeyType": "long",
  "BaseClass": "AuditedEntity",
  "EntityHistory": true,
  "AutoMigration": true,
  "UpdateDatabase": true,
  "CreateUserInterface": true,
  "CreateViewOnly": true,
  "CreateExcelExport": true,
  "IsNonModalCRUDPage": false,
  "IsMasterDetailPage": true,
  "PagePermission": {
    "Host": true,
    "Tenant": true
  },
  "Properties": [
    {
      "Name": "RequisitionNo",
      "Type": "string",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null
    },
    {
      "Name": "RequisitionDate",
      "Type": "DateTime",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null
    },
    {
      "Name": "Remarks",
      "Type": "string",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null
    },
    {
      "Name": "IsCashPayment",
      "Type": "bool",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null
    }
  ],
  "NavigationProperties": [
    {
      "Namespace": "RapidSystem.PM.PMProjects",
      "ForeignEntityName": "PMProject",
      "IdType": "long",
      "IsNullable": false,
      "PropertyName": "PMProjectId",
      "DisplayPropertyName": "ProjectName",
      "DuplicationNumber": 0,
      "RelationType": "single",
      "ViewType": "Dropdown"
    },
    {
      "Namespace": "RapidSystem.Lookup.APStatuses",
      "ForeignEntityName": "APStatus",
      "IdType": "long",
      "IsNullable": true,
      "PropertyName": "APStatusId",
      "DisplayPropertyName": "StatusName",
      "DuplicationNumber": 0,
      "RelationType": "single",
      "ViewType": "Dropdown"
    }
  ],
  "NavigationPropertyOneToManyTables": [
            {
                "EntityJson": "SCM.SCMRequisitionItems.SCMRequisitionItem.json",
                "ForeignPropertyName": "SCMRequisitionId",
                "IsNullable": "True",
                "DisplayPropertyName": "RequisitionNo",
                "ViewType": "LookupTable"
            },
        ],
  "EnumDefinitions": [],
  "DbContext": null
}

And here is the detail entity json file:

{
  "IsRegenerate": true,
  "MenuPosition": "main",
  "RelativeNamespace": "SCM.SCMRequisitionItems",
  "EntityName": "SCMRequisitionItem",
  "EntityNamePlural": "SCMRequisitionItems",
  "TableName": "SCMRequisitionItems",
  "PrimaryKeyType": "long",
  "BaseClass": "AuditedEntity",
  "EntityHistory": false,
  "AutoMigration": true,
  "UpdateDatabase": true,
  "CreateUserInterface": true,
  "CreateViewOnly": true,
  "CreateExcelExport": true,
  "IsNonModalCRUDPage": false,
  "IsMasterDetailPage": false,
  "PagePermission": {
    "Host": true,
    "Tenant": true
  },
  "Properties": [
    {
      "Name": "BOQQty",
      "Type": "decimal",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": true,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null
    },
    {
      "Name": "ConsumedQty",
      "Type": "decimal",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": true,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null
    },
    {
      "Name": "LastPurchasePrice",
      "Type": "decimal",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": true,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null
    },
    {
      "Name": "MarketPrice",
      "Type": "decimal",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": true,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null
    },
    {
      "Name": "RequisitionPrice",
      "Type": "decimal",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null
    },
    {
      "Name": "RequiredQty",
      "Type": "decimal",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null
    }
  ],
  "NavigationProperties": [{
      "Namespace": "RapidSystem.SCM.SCMRequisitions",
      "ForeignEntityName": "SCMRequisition",
      "IdType": "long",
      "IsNullable": true,
      "PropertyName": "SCMRequisitionId",
      "DisplayPropertyName": "RequisitionNo",
      "DuplicationNumber": 0,
      "RelationType": "single",
      "ViewType": "LookupTable",
      "IsGeneratedByMasterPage": true
   ",IsGeneratedByMasterPage": true },
    {
      "Namespace": "RapidSystem.Lookup.Items",
      "ForeignEntityName": "Item",
      "IdType": "long",
      "IsNullable": false,
      "PropertyName": "ItemId",
      "DisplayPropertyName": "ItemName",
      "DuplicationNumber": 0,
      "RelationType": "single",
      "ViewType": "LookupTable"
    },
    {
      "Namespace": "RapidSystem.Lookup.ItemSpecifications",
      "ForeignEntityName": "ItemSpecification",
      "IdType": "long",
      "IsNullable": true,
      "PropertyName": "ItemSpecificationId",
      "DisplayPropertyName": "SpecificationName",
      "DuplicationNumber": 0,
      "RelationType": "single",
      "ViewType": "LookupTable"
    },
    {
      "Namespace": "RapidSystem.Lookup.Units",
      "ForeignEntityName": "Unit",
      "IdType": "long",
      "IsNullable": false,
      "PropertyName": "UnitId",
      "DisplayPropertyName": "UnitName",
      "DuplicationNumber": 0,
      "RelationType": "single",
      "ViewType": "Dropdown"
    },
    {
      "Namespace": "RapidSystem.PM.PMProjectUnits",
      "ForeignEntityName": "PMProjectUnit",
      "IdType": "long",
      "IsNullable": true,
      "PropertyName": "PMProjectUnitId",
      "DisplayPropertyName": "UnitName",
      "DuplicationNumber": 0,
      "RelationType": "single",
      "ViewType": "Dropdown"
    }
  ],
  "NavigationPropertyOneToManyTables": [],
  "EnumDefinitions": [],
  "DbContext": null
}

Can you please help me in this regard?


27 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @m.cseiu05

    I think this problem is fixed with the latest version of Power Tools, could you try it and see if it works ?

    Thanks,

  • User Avatar
    0
    m.cseiu05 created

    Hi ismcagdas

    Many thanks. I am able to generate master-detail using power tools now.

    Regards