Список обязательных полей для cущностей Account, Lead, Contact
Добрый день!
У одного из клиентов для сущностей: Лид, Контакт, Контрагент имеются обязательные поля.
Соответственно при попытке добавить сущность по протоколу OData получаем ошибку: такое то поле является обязательным.
Вопрос: как через OData получить список обязательных полей для сущностей Lead, Contact, Account ?
11 > POST https://004057-sales-enterprise.bpmonline.com/0/ServiceModel/EntityDataS... > Accept: application/atom+xml;type=entry;charset=utf-8
11 > Authorization: Basic TWFyaW5hOk1hUmlONGlL
11 > Content-Type: application/json;odata=verbose;type=entry
{"LeadName":null,"Contact":"Новый контакт","MobilePhone":"+380991112233","CreatedBy":null,"ModifiedBy":null,"Owner":null}
06.48.2017 14:48:26,758 INFO BpmConnector:56 - 12 * Client response received on thread http-nio-8443-exec-3
12 500
12 Cache-Control: no-cache
12 Content-Length: 724
12 Content-Type: application/xml;charset=utf-8
12 DataServiceVersion: 1.0;
12 Date: Mon, 06 Feb 2017 12:48:23 GMT
12 Server: Microsoft-IIS/8.5
12 Set-Cookie: BPMSESSIONID=0azjot4gqr0dqjmvcln4k0ri; path=/; HttpOnly
12 X-AspNet-Version: 4.0.30319
12 X-Content-Type-Options: nosniff
12 X-Frame-Options: SAMEORIGIN
12 X-Powered-By: ASP.NET
3
at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description)
at System.Data.Services.DataService`1.HandleRequest()
Нравится
Добрый день.
Вопрос получения списка обязательных полей через OData требует более глубокого анализа. Рекомендуем обратиться в Техническую поддержку Террасофт.
С уважением,
Группа компаний Terrasoft
Здравствуте!
Обратите внимание на статью Queryable OData Metadata
"Терещук Павел" написал:Здравствуте!
Обратите внимание на статью Queryable OData Metadata
Могу выполнить только такой запрос
https://004057-sales-enterprise.bpmonline.com/0/ServiceModel/EntityDataService.svc/$metadata
У меня у лида обязательным полем является email.
<EntityType Name="Lead"> <Key> <PropertyRef Name="Id" /> </Key> <Property Name="Id" Type="Edm.Guid" Nullable="false" /> <Property Name="LeadName" Type="Edm.String" /> <Property Name="CreatedOn" Type="Edm.DateTime" /> <Property Name="CreatedById" Type="Edm.Guid" /> <Property Name="ModifiedOn" Type="Edm.DateTime" /> <Property Name="ModifiedById" Type="Edm.Guid" /> <Property Name="ProcessListeners" Type="Edm.Int32" /> <Property Name="Notes" Type="Edm.String" /> <Property Name="Account" Type="Edm.String" /> <Property Name="Contact" Type="Edm.String" /> <Property Name="TitleId" Type="Edm.Guid" /> <Property Name="FullJobTitle" Type="Edm.String" /> <Property Name="StatusId" Type="Edm.Guid" /> <Property Name="InformationSourceId" Type="Edm.Guid" /> <Property Name="IndustryId" Type="Edm.Guid" /> <Property Name="AnnualRevenueId" Type="Edm.Guid" /> <Property Name="EmployeesNumberId" Type="Edm.Guid" /> <Property Name="BusinesPhone" Type="Edm.String" /> <Property Name="MobilePhone" Type="Edm.String" /> <Property Name="Email" Type="Edm.String" /> <Property Name="Fax" Type="Edm.String" /> <Property Name="Website" Type="Edm.String" /> <Property Name="AddressTypeId" Type="Edm.Guid" /> <Property Name="CountryId" Type="Edm.Guid" /> <Property Name="RegionId" Type="Edm.Guid" /> <Property Name="CityId" Type="Edm.Guid" /> <Property Name="Zip" Type="Edm.String" /> <Property Name="Address" Type="Edm.String" /> <Property Name="DoNotUseEmail" Type="Edm.Boolean" /> <Property Name="DoNotUsePhone" Type="Edm.Boolean" /> <Property Name="DoNotUseFax" Type="Edm.Boolean" /> <Property Name="DoNotUseSMS" Type="Edm.Boolean" /> <Property Name="DoNotUseMail" Type="Edm.Boolean" /> <Property Name="Commentary" Type="Edm.String" /> <Property Name="QualifiedContactId" Type="Edm.Guid" /> <Property Name="QualifiedAccountId" Type="Edm.Guid" /> <Property Name="LeadTypeId" Type="Edm.Guid" /> <Property Name="LeadTypeStatusId" Type="Edm.Guid" /> <Property Name="LeadDisqualifyReasonId" Type="Edm.Guid" /> <Property Name="AccountCategoryId" Type="Edm.Guid" /> <Property Name="AccountOwnershipId" Type="Edm.Guid" /> <Property Name="DepartmentId" Type="Edm.Guid" /> <Property Name="GenderId" Type="Edm.Guid" /> <Property Name="JobId" Type="Edm.Guid" /> <Property Name="DecisionRoleId" Type="Edm.Guid" /> <Property Name="QualifyStatusId" Type="Edm.Guid" /> <Property Name="Dear" Type="Edm.String" /> <Property Name="QualificationProcessId" Type="Edm.Guid" /> <Property Name="OwnerId" Type="Edm.Guid" /> <Property Name="RemindToOwner" Type="Edm.Boolean" /> <Property Name="SalesOwnerId" Type="Edm.Guid" /> <Property Name="Budget" Type="Edm.Decimal" /> <Property Name="MeetingDate" Type="Edm.DateTime" /> <Property Name="DecisionDate" Type="Edm.DateTime" /> <Property Name="ShowDistributionPage" Type="Edm.Boolean" /> <Property Name="RegisterMethodId" Type="Edm.Guid" /> <Property Name="LeadSourceId" Type="Edm.Guid" /> <Property Name="LeadMediumId" Type="Edm.Guid" /> <Property Name="OpportunityDepartmentId" Type="Edm.Guid" /> <Property Name="IdentificationPassed" Type="Edm.Boolean" /> <Property Name="StartLeadManagementProcess" Type="Edm.Boolean" /> <Property Name="SaleType" Type="Edm.String" /> <Property Name="Score" Type="Edm.Decimal" /> <Property Name="QualificationPassed" Type="Edm.Boolean" /> <Property Name="CountryStr" Type="Edm.String" /> <Property Name="RegionStr" Type="Edm.String" /> <Property Name="CityStr" Type="Edm.String" /> <Property Name="WebFormId" Type="Edm.Guid" /> <Property Name="BpmHref" Type="Edm.String" /> <Property Name="BpmRef" Type="Edm.String" /> <Property Name="Qualified" Type="Edm.Int32" /> <Property Name="SaleParticipant" Type="Edm.Int32" /> <Property Name="QualifiedPercent" Type="Edm.Decimal" /> <Property Name="SalePercent" Type="Edm.Decimal" /> <Property Name="OrderId" Type="Edm.Guid" /> <Property Name="OpportunityId" Type="Edm.Guid" /> <NavigationProperty Name="CreatedBy" Relationship="Terrasoft.Configuration.Lead_CreatedBy" ToRole="CreatedBy" FromRole="Lead" /> <NavigationProperty Name="ModifiedBy" Relationship="Terrasoft.Configuration.Lead_ModifiedBy" ToRole="ModifiedBy" FromRole="Lead" /> <NavigationProperty Name="Title" Relationship="Terrasoft.Configuration.Lead_Title_ContactSalutationType_LeadCollectionByTitle" ToRole="ContactSalutationType_LeadCollectionByTitle" FromRole="Lead_Title" /> <NavigationProperty Name="Status" Relationship="Terrasoft.Configuration.Lead_Status_LeadStatus_LeadCollectionByStatus" ToRole="LeadStatus_LeadCollectionByStatus" FromRole="Lead_Status" /> <NavigationProperty Name="InformationSource" Relationship="Terrasoft.Configuration.Lead_InformationSource_InformationSource_LeadCollectionByInformationSource" ToRole="InformationSource_LeadCollectionByInformationSource" FromRole="Lead_InformationSource" /> <NavigationProperty Name="Industry" Relationship="Terrasoft.Configuration.Lead_Industry_AccountIndustry_LeadCollectionByIndustry" ToRole="AccountIndustry_LeadCollectionByIndustry" FromRole="Lead_Industry" /> <NavigationProperty Name="AnnualRevenue" Relationship="Terrasoft.Configuration.Lead_AnnualRevenue_AccountAnnualRevenue_LeadCollectionByAnnualRevenue" ToRole="AccountAnnualRevenue_LeadCollectionByAnnualRevenue" FromRole="Lead_AnnualRevenue" /> <NavigationProperty Name="EmployeesNumber" Relationship="Terrasoft.Configuration.Lead_EmployeesNumber_AccountEmployeesNumber_LeadCollectionByEmployeesNumber" ToRole="AccountEmployeesNumber_LeadCollectionByEmployeesNumber" FromRole="Lead_EmployeesNumber" /> <NavigationProperty Name="AddressType" Relationship="Terrasoft.Configuration.Lead_AddressType_AddressType_LeadCollectionByAddressType" ToRole="AddressType_LeadCollectionByAddressType" FromRole="Lead_AddressType" /> <NavigationProperty Name="Country" Relationship="Terrasoft.Configuration.Lead_Country_Country_LeadCollectionByCountry" ToRole="Country_LeadCollectionByCountry" FromRole="Lead_Country" /> <NavigationProperty Name="Region" Relationship="Terrasoft.Configuration.Lead_Region_Region_LeadCollectionByRegion" ToRole="Region_LeadCollectionByRegion" FromRole="Lead_Region" /> <NavigationProperty Name="City" Relationship="Terrasoft.Configuration.Lead_City_City_LeadCollectionByCity" ToRole="City_LeadCollectionByCity" FromRole="Lead_City" /> <NavigationProperty Name="QualifiedContact" Relationship="Terrasoft.Configuration.Lead_QualifiedContact_Contact_LeadCollectionByQualifiedContact" ToRole="Contact_LeadCollectionByQualifiedContact" FromRole="Lead_QualifiedContact" /> <NavigationProperty Name="QualifiedAccount" Relationship="Terrasoft.Configuration.Lead_QualifiedAccount_Account_LeadCollectionByQualifiedAccount" ToRole="Account_LeadCollectionByQualifiedAccount" FromRole="Lead_QualifiedAccount" /> <NavigationProperty Name="LeadType" Relationship="Terrasoft.Configuration.Lead_LeadType_LeadType_LeadCollectionByLeadType" ToRole="LeadType_LeadCollectionByLeadType" FromRole="Lead_LeadType" /> <NavigationProperty Name="LeadTypeStatus" Relationship="Terrasoft.Configuration.Lead_LeadTypeStatus_LeadTypeStatus_LeadCollectionByLeadTypeStatus" ToRole="LeadTypeStatus_LeadCollectionByLeadTypeStatus" FromRole="Lead_LeadTypeStatus" /> <NavigationProperty Name="LeadDisqualifyReason" Relationship="Terrasoft.Configuration.Lead_LeadDisqualifyReason_LeadDisqualifyReason_LeadCollectionByLeadDisqualifyReason" ToRole="LeadDisqualifyReason_LeadCollectionByLeadDisqualifyReason" FromRole="Lead_LeadDisqualifyReason" /> <NavigationProperty Name="AccountCategory" Relationship="Terrasoft.Configuration.Lead_AccountCategory_AccountCategory_LeadCollectionByAccountCategory" ToRole="AccountCategory_LeadCollectionByAccountCategory" FromRole="Lead_AccountCategory" /> <NavigationProperty Name="AccountOwnership" Relationship="Terrasoft.Configuration.Lead_AccountOwnership_AccountOwnership_LeadCollectionByAccountOwnership" ToRole="AccountOwnership_LeadCollectionByAccountOwnership" FromRole="Lead_AccountOwnership" /> <NavigationProperty Name="Department" Relationship="Terrasoft.Configuration.Lead_Department_Department_LeadCollectionByDepartment" ToRole="Department_LeadCollectionByDepartment" FromRole="Lead_Department" /> <NavigationProperty Name="Gender" Relationship="Terrasoft.Configuration.Lead_Gender_Gender_LeadCollectionByGender" ToRole="Gender_LeadCollectionByGender" FromRole="Lead_Gender" /> <NavigationProperty Name="Job" Relationship="Terrasoft.Configuration.Lead_Job_Job_LeadCollectionByJob" ToRole="Job_LeadCollectionByJob" FromRole="Lead_Job" /> <NavigationProperty Name="DecisionRole" Relationship="Terrasoft.Configuration.Lead_DecisionRole_ContactDecisionRole_LeadCollectionByDecisionRole" ToRole="ContactDecisionRole_LeadCollectionByDecisionRole" FromRole="Lead_DecisionRole" /> <NavigationProperty Name="QualifyStatus" Relationship="Terrasoft.Configuration.Lead_QualifyStatus_QualifyStatus_LeadCollectionByQualifyStatus" ToRole="QualifyStatus_LeadCollectionByQualifyStatus" FromRole="Lead_QualifyStatus" /> <NavigationProperty Name="Owner" Relationship="Terrasoft.Configuration.Lead_Owner_Contact_LeadCollectionByOwner" ToRole="Contact_LeadCollectionByOwner" FromRole="Lead_Owner" /> <NavigationProperty Name="SalesOwner" Relationship="Terrasoft.Configuration.Lead_SalesOwner_Contact_LeadCollectionBySalesOwner" ToRole="Contact_LeadCollectionBySalesOwner" FromRole="Lead_SalesOwner" /> <NavigationProperty Name="RegisterMethod" Relationship="Terrasoft.Configuration.Lead_RegisterMethod_LeadRegisterMethod_LeadCollectionByRegisterMethod" ToRole="LeadRegisterMethod_LeadCollectionByRegisterMethod" FromRole="Lead_RegisterMethod" /> <NavigationProperty Name="LeadSource" Relationship="Terrasoft.Configuration.Lead_LeadSource_LeadSource_LeadCollectionByLeadSource" ToRole="LeadSource_LeadCollectionByLeadSource" FromRole="Lead_LeadSource" /> <NavigationProperty Name="LeadMedium" Relationship="Terrasoft.Configuration.Lead_LeadMedium_LeadMedium_LeadCollectionByLeadMedium" ToRole="LeadMedium_LeadCollectionByLeadMedium" FromRole="Lead_LeadMedium" /> <NavigationProperty Name="OpportunityDepartment" Relationship="Terrasoft.Configuration.Lead_OpportunityDepartment_OpportunityDepartment_LeadCollectionByOpportunityDepartment" ToRole="OpportunityDepartment_LeadCollectionByOpportunityDepartment" FromRole="Lead_OpportunityDepartment" /> <NavigationProperty Name="WebForm" Relationship="Terrasoft.Configuration.Lead_WebForm_GeneratedWebForm_LeadCollectionByWebForm" ToRole="GeneratedWebForm_LeadCollectionByWebForm" FromRole="Lead_WebForm" /> <NavigationProperty Name="Order" Relationship="Terrasoft.Configuration.Lead_Order_Order_LeadCollectionByOrder" ToRole="Order_LeadCollectionByOrder" FromRole="Lead_Order" /> <NavigationProperty Name="Opportunity" Relationship="Terrasoft.Configuration.Lead_Opportunity_Opportunity_LeadCollectionByOpportunity" ToRole="Opportunity_LeadCollectionByOpportunity" FromRole="Lead_Opportunity" /> <NavigationProperty Name="ActivityCollectionByLead" Relationship="Terrasoft.Configuration.Activity_Lead_Lead_ActivityCollectionByLead" ToRole="Activity_Lead" FromRole="Lead_ActivityCollectionByLead" /> <NavigationProperty Name="CallCollectionByLead" Relationship="Terrasoft.Configuration.Call_Lead_Lead_CallCollectionByLead" ToRole="Call_Lead" FromRole="Lead_CallCollectionByLead" /> <NavigationProperty Name="FileLeadCollectionByLead" Relationship="Terrasoft.Configuration.FileLead_Lead_Lead_FileLeadCollectionByLead" ToRole="FileLead_Lead" FromRole="Lead_FileLeadCollectionByLead" /> <NavigationProperty Name="LeadAddressCollectionByLead" Relationship="Terrasoft.Configuration.LeadAddress_Lead_Lead_LeadAddressCollectionByLead" ToRole="LeadAddress_Lead" FromRole="Lead_LeadAddressCollectionByLead" /> <NavigationProperty Name="LeadInFolderCollectionByLead" Relationship="Terrasoft.Configuration.LeadInFolder_Lead_Lead_LeadInFolderCollectionByLead" ToRole="LeadInFolder_Lead" FromRole="Lead_LeadInFolderCollectionByLead" /> <NavigationProperty Name="LeadInTagCollectionByEntity" Relationship="Terrasoft.Configuration.LeadInTag_Entity_Lead_LeadInTagCollectionByEntity" ToRole="LeadInTag_Entity" FromRole="Lead_LeadInTagCollectionByEntity" /> <NavigationProperty Name="LeadProductCollectionByLead" Relationship="Terrasoft.Configuration.LeadProduct_Lead_Lead_LeadProductCollectionByLead" ToRole="LeadProduct_Lead" FromRole="Lead_LeadProductCollectionByLead" /> <NavigationProperty Name="SpecificationInLeadCollectionByLead" Relationship="Terrasoft.Configuration.SpecificationInLead_Lead_Lead_SpecificationInLeadCollectionByLead" ToRole="SpecificationInLead_Lead" FromRole="Lead_SpecificationInLeadCollectionByLead" /> </EntityType>
Вот поле email для Lead
У него отсутствует аттрибут nullable="false", но добавить я его без поля Email не могу.
Конечно в данной ситуации мне известно какое поле не задано, но нужен способ узнать это через запрос. $metadata не дает мне такой информации
Добрый день.
Рекомендуем вам ознакомиться с информацией по Odata на сайте http://www.odata.org/. Либо задать вопрос на http://stackoverflow.com/.
С уважением,
Группа компаний Terrasoft