Проблема с справочником

Здравствуйте.
Создал справочник, аналогично "Стадии проектов".
Тестирую не всё окно, а только первый Grid.
При попытке создать новую запись в wnd_OurDepartmentGridArea вылетает ошибка:
Exception class: EListError
Exception message: List index out of bounds (-1)
Уже голову сломал. Проверил соответствие указанному выше справочнику каждого знака. Может баг? Техподдержка не отвечает.
ds_OurDepartment.xml

xml version="1.0" encoding="UTF-8"?>
Service UID="75AC1716B0474026BA8F8DB56B3BEC7E" USI="X15\Dictionaries\OurDepartment\ds_OurDepartment" ServiceTypeCode="DBDataset" Caption="ds_OurDepartment" ScriptUSI="ds_OurDepartmentScript" KeyDataFieldName="ID" SelectQueryUSI="sq_OurDepartment" PrimaryDisplayDataFieldName="Name">
        EventsDispatcher>
                Item ObjectID="ds_OurDepartment" UID="4E6652E74A194FE9A34BA769FB218B6C">
                        Item MethodName="OnDatasetBeforePost" UID="84E80B32D38F4039B968BAD00B8CDEC5" ScriptMethodName="ds_OurDepartmentOnDatasetBeforePost">
                        Item>
                        Item MethodName="OnDatasetAfterPost" UID="4D1AD9B86A264B7EA7D48206EAC1BBFE" ScriptMethodName="ds_OurDepartmentOnDatasetAfterPost">
                        Item>
                Item>
        EventsDispatcher>
        DataFields>
                Item Name="ID" UID="AF8C4CF481744F0984565B1128D24459" Type="StringDataField" Caption="ID" TextLength="38">
                Item>
                Item Name="Name" UID="DB6D95318BF045A7BE3E0950DD6A5B37" Type="StringDataField" Caption="Название отдела" IsSearchField="True" IsDisplayField="True" IsRequired="True">
                Item>
        DataFields>
Service>

ds_OpportunityScript.xml
xml version="1.0" encoding="UTF-8"?>
Service UID="70AE41A5F0A84717B28798A626F3307F" USI="X15\Dictionaries\OurDepartment\ds_OurDepartmentScript" ServiceTypeCode="Script" Caption="ds_OurDepartmentScript" Text="FFFE2F002F002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D000D000A002F002F002000640073005F004F00750072004400650070006100720074006D0065006E0074005300630072006900700074000D000A002F002F002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D000D000A000D000A0076006100720020004F00750072004400650070006100720074006D0065006E00740020003D0020006E006500770020004F0062006A00650063007400280029003B000D000A000D000A00660075006E006300740069006F006E0020004F00750072004400650070006100720074006D0065006E00740044006100740061007300650074004100660074006500720050006F0073007400280044006100740061007300650074002900200020007B000D000A00200020002000200076006100720020004F00750072004400650070006100720074006D0065006E0074004900440020003D00200044006100740061007300650074002E00560061006C007500650073002800270049004400270029003B000D000A002F002A000D000A0020002000200020007600610072002000410064006D0069006E0055006E00690074004900440020003D00200044006100740061007300650074002E00410074007400720069006200750074006500730028002700410064006D0069006E0055006E006900740049004400270029003B000D000A00200020002000200069006600280021004900730045006D00700074007900560061006C00750065002800410064006D0069006E0055006E006900740049004400290029007B000D000A00200020002000200020002000200020005400790070006500440061007400610073006500740020003D00200047006500740054007900700065004400610074006100730065007400280029003B000D000A0020002000200020002000200020002000540079007000650044006100740061007300650074002E0041007000700065006E006400280029003B000D000A0020002000200020000900540079007000650044006100740061007300650074002E00560061006C0041007300470055004900440028002700490044002700290020003D00200043006F006E006E006500630074006F0072002E00470065006E004700550049004400280029003B000D000A0009002000200020002000540079007000650044006100740061007300650074002E00560061006C00410073004700550049004400280027004400650070006100720074006D0065006E007400490044002700290020003D0020004F00750072004400650070006100720074006D0065006E007400490044003B000D000A0009002000200020002000540079007000650044006100740061007300650074002E00560061006C0041007300470055004900440028002700410064006D0069006E0055006E0069007400490044002700290020003D002000410064006D0069006E0055006E0069007400490044003B000D000A0020002000200020007D000D000A002A002F000D000A007D000D000A000D000A00660075006E006300740069006F006E002000470065007400540079007000650044006100740061007300650074002800290020007B000D000A00090069006600200028002100410073007300690067006E006500640028004F00750072004400650070006100720074006D0065006E0074002E00540079007000650044006100740061007300650074002900290020007B000D000A00090009004F00750072004400650070006100720074006D0065006E0074002E005400790070006500440061007400610073006500740020003D000D000A0009000900530065007200760069006300650073002E004700650074004E00650077004900740065006D004200790055005300490028002700640073005F00410064006D0069006E0049006E004F00750072004400650070006100720074006D0065006E007400270029003B000D000A0009007D000D000A000900720065007400750072006E0020004F00750072004400650070006100720074006D0065006E0074002E00540079007000650044006100740061007300650074003B000D000A007D000D000A000D000A002F002F0020002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D000D000A002F002F0020004500760065006E0074002000680061006E0064006C006500720073000D000A002F002F0020002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D002D000D000A000D000A00660075006E006300740069006F006E002000640073005F004F00750072004400650070006100720074006D0065006E0074004F006E0044006100740061007300650074004200650066006F007200650050006F0073007400280044006100740061007300650074002C00200044006F0050006F0073007400290020007B000D000A00200020004F00750072004400650070006100720074006D0065006E0074002E004900730041007000700065006E00640020003D002000280044006100740061007300650074002E005300740061007400650020003D003D00200064007300740049006E00730065007200740029003B000D000A007D000D000A000D000A00660075006E006300740069006F006E002000640073005F004F00750072004400650070006100720074006D0065006E0074004F006E0044006100740061007300650074004100660074006500720050006F007300740028004400610074006100730065007400290020007B000D000A00200020004F00750072004400650070006100720074006D0065006E00740044006100740061007300650074004100660074006500720050006F00730074002800440061007400610073006500740029003B000D000A007D000D000A00">
        Includes>
                Item ScriptUSI="scr_DB" UID="269E4BD57CA742E7AEFDB9C093CE8F94">
                Item>
                Item ScriptUSI="scr_Utils" UID="6A374EAC6C794C379A67E42696FF78BC">
                Item>
        Includes>
Service>

sq_OurDepartment.xml
xml version="1.0" encoding="UTF-8"?>
Service UID="34E4FC737D0440A3AE7EF8EF288F3C8A" USI="X15\Dictionaries\OurDepartment\sq_OurDepartment" ServiceTypeCode="SelectQuery" Caption="sq_OurDepartment">
        Parameters>
                Item Name="ID" UID="E2F762991C2F468CBAE8C41404CEE646" DataType="7" Value_ValueType="0">
                Item>
                Item Name="Name" UID="33817DAAED264CDEB7DFC73AB476CA00" Value_ValueType="0">
                Item>
                Item Name="AdminUnitID" UID="521564A10EAE4BD4A504792690A80711" DataType="7" Value_ValueType="0">
                Item>
        Parameters>
        Selects>
                Item Code="Select" UID="3A5B64F1F64844EC9D4526CA5201A347" FromTableAlias="tbl_OurDepartment" FromTableUSI="tbl_OurDepartment">
                        Joins>
                                Item LeftTableAlias="tbl_AdminInOurDepartment" UID="0369A94B134F4901B977E8E152142E04" LeftFieldTableUSI="tbl_AdminInOurDepartment" RightFieldTableUSI="tbl_OurDepartment" LeftFieldSQLName="DepartmentID" RightFieldSQLName="ID">
                                Item>
                        Joins>
                        Columns>
                                Item ColumnAlias="ID" UID="4F631C0B53284D6A9361C9AE8BFEBC17" Type="GeneralColumn" CanDisable="False" FieldSQLName="ID" FieldTableUSI="tbl_OurDepartment">
                                Item>
                                Item ColumnAlias="Name" UID="BF3EACE4E85245998A3F62F4A0ADA28D" Type="GeneralColumn" FieldSQLName="Name" FieldTableUSI="tbl_OurDepartment">
                                Item>
                        Columns>
                        Filters Type="Filters">
                                UserFilters>
                                UserFilters>
                                Item Code="ID" UID="40D90EDA774B42ACBF362F104E2D042B" Type="CompareFilter" IsEnabled="False" ExpressionTypeCode="FieldFilterExpression" ValueExpressionTypeCode="ParamFilterExpression">
                                        TestExpression Type="FieldFilterExpression" FieldSQLName="ID" FieldTableUSI="tbl_OurDepartment" TableAlias="tbl_OurDepartment">
                                        TestExpression>
                                        ValueExpression Type="ParamFilterExpression" ParameterName="ID">
                                        ValueExpression>
                                Item>
                                Item Code="Name" UID="61DF8A044C904E24ABE7E4F1FA26A5E7" Type="CompareFilter" IsEnabled="False" ExpressionTypeCode="FieldFilterExpression" ValueExpressionTypeCode="ParamFilterExpression">
                                        TestExpression Type="FieldFilterExpression" FieldSQLName="Name" FieldTableUSI="tbl_OurDepartment" TableAlias="tbl_OurDepartment">
                                        TestExpression>
                                        ValueExpression Type="ParamFilterExpression" ParameterName="Name">
                                        ValueExpression>
                                Item>
                                Item Code="AdminUnitID" UID="B372DCD72D28422891B093DDDA942DF9" Type="CompareFilter" IsEnabled="False" ExpressionTypeCode="FieldFilterExpression" ValueExpressionTypeCode="ParamFilterExpression">
                                        TestExpression Type="FieldFilterExpression" FieldSQLName="AdminUnitID" FieldTableUSI="tbl_AdminInOurDepartment" TableAlias="tbl_AdminInOurDepartment">
                                        TestExpression>
                                        ValueExpression Type="ParamFilterExpression" ParameterName="AdminUnitID">
                                        ValueExpression>
                                Item>
                        Filters>
                Item>
        Selects>
Service>

tbl_OurDepartment.xml
xml version="1.0" encoding="UTF-8"?>
Service UID="AC89420ECAAD4321924B1E59CE5BB4C4" USI="X15\Dictionaries\OurDepartment\tbl_OurDepartment" ServiceTypeCode="Table" Caption="Наши отделы" SQLName="tbl_OurDepartment" ParentTableGroupUSI="tg_Dictionaries">
        Fields>
                Item SQLName="ID" UID="2A4EDC42A05D47508670D42DD2671D95" Caption="ID" SQLDataType="0" SQLSize="0">
                Item>
                Item SQLName="CreatedOn" UID="134656C7591E4F22A60D4F06534F1AF3" Caption="CreatedOn" SQLDataType="4" SQLSize="0">
                Item>
                Item SQLName="CreatedByID" UID="0F5191B80F334690930200606171D657" Caption="CreatedByID" SQLDataType="7" SQLSize="0">
                Item>
                Item SQLName="ModifiedOn" UID="6DB7C4B05918435FAF8F6C77D01D204F" Caption="ModifiedOn" SQLDataType="4" SQLSize="0">
                Item>
                Item SQLName="ModifiedByID" UID="92AD16B9A5BC4683A85DDA2EB65A1EEA" Caption="ModifiedByID" SQLDataType="7" SQLSize="0">
                Item>
                Item SQLName="Name" UID="B727248FEFBE4CAB9F81668E2DB07E2C" Caption="Отдел">
                Item>
        Fields>
        Indexes>
                Item SQLName="IOurDepartment" UID="D97734DC6D0847219B491F3D023DD69A">
                        Item FieldSQLName="Name" UID="99A27F86745443D68C9C6466CF798976">
                        Item>
                Item>
        Indexes>
Service>

tbl_OurDepartmentRight.xml
xml version="1.0" encoding="UTF-8"?>
Service UID="EEF5F8B9CFD546AAA46D7F51C04ED841" USI="X15\Dictionaries\OurDepartment\tbl_OurDepartmentRight" ServiceTypeCode="Table" Caption="tbl_OurDepartmentRight" SQLName="tbl_OurDepartmentRight">
        Fields>
                Item SQLName="ID" UID="7A4F22EFA64E4F29B91F7A9CD8807DBA" Caption="ID" SQLDataType="0" SQLSize="0">
                Item>
                Item SQLName="RecordID" UID="EDE862DFD753410294610662056E630A" Caption="ID Записи" SQLDataType="7" SQLSize="0">
                Item>
                Item SQLName="AdminUnitID" UID="8DE6B66C3F6848E3982C0B74F346B7A9" Caption="ID Объекта администрирования" SQLDataType="7" SQLSize="0">
                Item>
                Item SQLName="CanRead" UID="0C5EAD6993AE4A62AE28D8B19DCBB224" Caption="Чтение" SQLDataType="5" SQLSize="0">
                Item>
                Item SQLName="CanWrite" UID="49B754831DA84A6DB94B8DBC2D31105B" Caption="Запись" SQLDataType="5" SQLSize="0">
                Item>
                Item SQLName="CanDelete" UID="CA396CF6871149718A45315F7412E3D7" Caption="Удаление" SQLDataType="5" SQLSize="0">
                Item>
                Item SQLName="CanChangeAccess" UID="51065ACDC1514D6390240912E9FA6BF2" Caption="Изменение доступа" SQLDataType="5" SQLSize="0">
                Item>
                Item SQLName="CanDel" UID="0B16D039B6C74010B7E31A8F84120119" Caption="Возможностьудаления" SQLDataType="5" SQLSize="0">
                Item>
        Fields>
        Indexes>
                Item SQLName="IOurDepartmentRight" UID="DD03EE6F0DA3417E83D9367E3FFCF561">
                        Item FieldSQLName="ID" UID="5DBE433021B949BE85246FD1B6F09D64">
                        Item>
                        Item FieldSQLName="RecordID" UID="B3DB213F6F124665B76A98EF492DCD4E">
                        Item>
                Item>
        Indexes>
        Relations>
                Item SQLName="FOurDepartmentRightRecordID1" UID="51A93724DC2845A58E841C1E07CDB0AE" IsCascade="True" ParentFieldTableUSI="tbl_OurDepartment" ParentFieldSQLName="ID" ChildFieldSQLName="RecordID">
                Item>
                Item SQLName="FRightAdminUnitID1" UID="526CAB1B2E9A45F79F0ACC6A9A9E4371" ParentFieldTableUSI="tbl_OurDepartment" ParentFieldSQLName="ID" ChildFieldSQLName="AdminUnitID">
                Item>
        Relations>
Service>

wnd_OurDepartmentEdit.xml
xml version="1.0" encoding="UTF-8"?>
Service UID="04BE28213B094BD280A63938BB1DAD50" USI="X15\Dictionaries\OurDepartment\wnd_OurDepartmentEdit" ServiceTypeCode="Window" Caption="wnd_OurDepartmentEdit" TemplateWindowUSI="wnd_BaseDBEdit" Width="517" Height="82" Name="wnd_OurDepartmentEdit" Type="Window">
        EventsDispatcher>
                Item ObjectID="btnOK" UID="71840B7C8B6147139EF3C7EEC95B1357">
                        Item MethodName="OnClick" UID="8CC0A9FB987C4084A715972ADA96C86C">
                        Item>
                Item>
                Item ObjectID="btnCancel" UID="6D9A15A258C64CEB93D25F84C382C2C4">
                        Item MethodName="OnClick" UID="F1147AA13FB94B73B6818691EB7FC721">
                        Item>
                Item>
                Item ObjectID="wnd_OurDepartmentEdit" UID="A089C52E22914222AE6137D01DADB5A6">
                        Item MethodName="OnClose" UID="279B10F5AA7443AFA550D09AA5557A0B">
                        Item>
                        Item MethodName="OnPrepare" UID="669A6321C4EC496C9FB5897191C82E0D">
                        Item>
                Item>
        EventsDispatcher>
        NonVisualComponents>
                Item Name="dlData" UID="DCEE31D6EC7E4EC2B16B80DE0E64C27E" Type="DatasetLink" IsInherited="True" ServiceUSI="ds_OurDepartment">
                Item>
        NonVisualComponents>
        Item Name="frmData" UID="2A346BBFACCB4B4ABFE44FDC6CCE556E" Type="Frame" IsInherited="True">
                Item Name="TextDataControl" UID="4D9680784F0445EF89EA8AAB9A5978D9" Type="TextDataControl" AlignHorizontal="2" DatasetLinkName="dlData" DataFieldName="Name">
                Item>
        Item>
        Item Name="frmButtons" UID="64FFBAC456BB4D329544DF1877F321EC" Type="Frame" IsInherited="True">
                Item Name="btnOK" UID="C7C0F4A4FEF8446086D4AB78D09B78BF" Type="Button" IsInherited="True">
                Item>
                Item Name="btnCancel" UID="6228F12DEE8D47ECB2E88319FB8AC9C6" Type="Button" IsInherited="True">
                Item>
        Item>
Service>

Нравится

3 комментария

wnd_OurDepartmentGridArea.xml

<?xml version="1.0" encoding="UTF-8"?>
<Service UID="1B2F2250B3D34371BC15C73A06389F9E" USI="X15\Dictionaries\OurDepartment\wnd_OurDepartmentGridArea" ServiceTypeCode="Window" Caption="wnd_OurDepartmentGridArea" ScriptUSI="wnd_OurDepartmentGridAreaScript" TemplateWindowUSI="wnd_BaseGridArea" WindowCaption="Отделы" Name="wnd_OurDepartmentGridArea" Type="Window">
	<EventsDispatcher>
		<Item ObjectID="dlData" UID="0C2BF3EAE745422DABA99EA9E1252F6C">
			<Item MethodName="OnDatasetAfterOpen" UID="8B95F482B70247EB8E23646B48F3AAAE">
			</Item>
			<Item MethodName="OnDatasetAfterDelete" UID="B23CC0A1648745F395B792CD65983A8C">
			</Item>
			<Item MethodName="OnDatasetAfterPost" UID="EE5F94B91EAE48DF8F9E9681685CF0FC">
			</Item>
			<Item MethodName="OnDatasetRefreshRecord" UID="C16E7CA904BC4678A7732CC73F6EA80D">
			</Item>
			<Item MethodName="OnDatasetOpenError" UID="E69C57244EFD4E6BB2B1AD4924CE93B3">
			</Item>
		</Item>
		<Item ObjectID="amGrid" UID="004A2F9094034E0FB84415E591466468">
			<Item MethodName="OnPrepare" UID="E8F293B1395846E6ADAAB576EFF0B2CA">
			</Item>
		</Item>
		<Item ObjectID="amiShowHistoryWindow" UID="0277556414CB4273847E10B1BF4FB5C0">
			<Item MethodName="OnExecute" UID="ED79FADC15024EF0A0A74737EB2F29C2">
			</Item>
		</Item>
		<Item ObjectID="btnAdd" UID="6B446188CE5C4FDBB6605D948015E26F">
			<Item MethodName="OnClick" UID="0656541467694DE6821C8329D48CBC51">
			</Item>
		</Item>
		<Item ObjectID="btnCopy" UID="1E22C8152CF040DD926BBBA491174939">
			<Item MethodName="OnClick" UID="9AFE5A7C3CD745CE85572910391CCCA1">
			</Item>
		</Item>
		<Item ObjectID="btnEdit" UID="D3D78B2C052649A88C25951633E380B3">
			<Item MethodName="OnClick" UID="9C1EA0B360EB40FF918AD2EB160DD896">
			</Item>
		</Item>
		<Item ObjectID="btnDelete" UID="45EF415623184060A12C026EF3FD7A7D">
			<Item MethodName="OnClick" UID="6D3C1D7821D348A7A590591DACAFB4AE">
			</Item>
		</Item>
		<Item ObjectID="wnd_OurDepartmentGridArea" UID="865B4ACC4F4F4A829E39F008CA8BF24F">
			<Item MethodName="OnPrepare" UID="F0EFC128E9B9400495DFB764687BD326" ScriptMethodName="wnd_OurDepartmentGridAreaOnPrepare">
			</Item>
			<Item MethodName="OnNotify" UID="B72D0E55A99D4221A5DFF4A216D79323">
			</Item>
		</Item>
		<Item ObjectID="grdData" UID="30AF2CF0EEC94446B905F52A13F4CEF9">
			<Item MethodName="OnDblClick" UID="3263EDAB484E4F55B962EB5AF83FCF68">
			</Item>
			<Item MethodName="OnActiveViewChanged" UID="71EC019648C6465CA83BC9692A394C5C">
			</Item>
		</Item>
	</EventsDispatcher>
	<NonVisualComponents>
		<Item Name="dlData" UID="5E94082ABE354036B54EEB50C3D42B07" Type="DatasetLink" IsInherited="True" ServiceUSI="ds_OurDepartment">
		</Item>
		<Item Name="amGrid" UID="020E9F31A5E541C99A3AA790856ED6C6" Type="ActionMenu" IsInherited="True">
			<Item Name="amiShowHistoryWindow" UID="5D028CCADC694283A290E2AF45FEE90A" Type="ActionMenuItem" IsInherited="True">
			</Item>
			<Item Name="amiGoto" UID="6DB7B9AF9CEC4A5C99C312D5EA199F6C" Type="ActionMenuItem" IsInherited="True">
			</Item>
		</Item>
	</NonVisualComponents>
	<Item Name="frmGrid" UID="C41DF36857274314A673A9DE639B026C" Type="Frame" IsInherited="True">
		<Item Name="grdData" UID="B05F11A0A3CD47548A8865A1B457B622" Type="DataGrid" IsInherited="True">
			<Item Name="dgvData" UID="8510DE1B5C054371AB0D858BA0F425CA" Type="DataGridView">
				<Item Name="colName" UID="CA266D39BED14796B6CC8AA717CC7F7F" Type="DataGridColumn" DataFieldName="Name">
				</Item>
			</Item>
		</Item>
	</Item>
	<Item Name="frmButtons" UID="CACD9312141D40D9974632F81B2CB0A6" Type="Frame" IsInherited="True">
		<Item Name="btnAdd" UID="574F6B54066B49D5B41F2967A9642EF0" Type="Button" IsInherited="True">
		</Item>
		<Item Name="btnCopy" UID="75233A687FD443C7BFC5328BA78AAAC9" Type="Button" IsInherited="True">
		</Item>
		<Item Name="btnEdit" UID="0B0E38876FD74DAF91E607BC439177B9" Type="Button" IsInherited="True">
		</Item>
		<Item Name="btnDelete" UID="91789F0B31514B669F67450162AEDF95" Type="Button" IsInherited="True">
		</Item>
	</Item>
</Service>

wnd_OurDepartmentGridAreaScript.xml
Ни в какую форум не хочет публиковать

Здравствуйте, Константин!

Создание подобного справочника — несколько специфическая задача.
Мы уже получили Ваше письмо и на данный момент анализируем созданные Вами сервисы.
Предлагаю подальшую работу по данному обращению вести через почту.

Terrasoft Support Team

Показать все комментарии