Hello,



I want to make a cascading dropdown. For example; user selects City, then County, then District, then Street... I want to fill the dropdowns from external web service whenever user selected previous dropdown.



How should i go about it?



Like 3

Like

3 comments

Hello Ensar,

Loos like you just need to add a filter to the column based on the other column value.

You can do it by adding attribute on the needed column.

For example:

"Transport": {
                "dataValueType": Terrasoft.DataValueType.LOOKUP,
                "lookupListConfig": {
                    "filters": [
                        function() {
                            var filterGroup = Ext.create("Terrasoft.FilterGroup");
                            filterGroup.add("WhatWeight",
                                Terrasoft.createColumnFilterWithParameter(
                                    Terrasoft.ComparisonType.GREATER,
                                    "[StTransport:Id].StMaxWeight",
                                    this.get("Weight")));
                            return filterGroup;
                        }
                    ]
                }

In this example we have column "Transport" and we wont to display values where their column "StMaxWeight" is greater that out column "Weight".

Thanks for your reply Dmytro Vovchenko,

 

Filtering is ok. At the same time, i need to get data from external web service not database. Is there a way binding lookups to external web service dynamically?

Not quite understand what are you trying to do but I think you can store the value from your web service in the schemas attribute and then work with it. To make it work you just need to somehow get the needed value from the web server in the schema code. 

Show all comments

Hi Community,

 

  • I am trying to pass the JSON string into the Web-Service Element of the Business Process. I had tried this in one of the trial instances of version 7.18.0.1353. In this version, Web-Service Element has Request body parameter in its Advanced Setting. The screenshot of this is as below. 

 

 

 

  • I want to implement this same POC in another instance which is in a version of  7.17.3.1377. But the "Request body" parameter in Advanced Setting of Web-Service Element and I am not able to pass JSON in this instance.

 

 

Is there any way ? to achieve this POC working in the instance of version 7.17.3.1377

Please guide me on this.

 

Thanks and Regards.

Like 0

Like

1 comments
Best reply

Hello,

 

This feature is available starting from 7.17.4 version. The simplest way to achieve it is just to upgrade your website to 7.17.4 or even better to 7.18.0 which is the latest actual version of the app.

 

Regards,

Dean

Hello,

 

This feature is available starting from 7.17.4 version. The simplest way to achieve it is just to upgrade your website to 7.17.4 or even better to 7.18.0 which is the latest actual version of the app.

 

Regards,

Dean

Show all comments

Can someone help me integrate Creatio with Power Bi, please?

 

How do Authenticate in Power Bi? I'm using Basic which works in Postman

 

Like 1

Like

3 comments

Hello Nicola,

First of all, select OData for your data source type, not Web content (web content won't perform the authentication the way that is needed for the OData auth challenge). Secondly, for some reason, I can't get Power BI to connect to Creatio's OData 4 endpoints (although I've not tried much with OData 4 in Power BI yet). However, when using the OData source type, I can connect to Creatio's OData 3 endpoints. Try using the following endpoint instead:

https://rdrive.creatio.com/0/ServiceModel/EntityDataService.svc/ContactCollection

Ryan

Ryan Farley,

 

Thank you for the suggestion, unfortunately I can't get this to work either.

 

I have been having difficultly using Odata3 as a whole and have only been able to use OData4.

 

Even using web browse I have no results with OData3, I have added screen shots of the results for both Power Bi and Browser.

However I was able to authenticate through PostMan, but not go much further as I haven't had much exposure to PostMan.

I can retrieved results from the Browser using OData4, but unable to authenticate In Power Bi. Also attached Results.

 

I can't quite seem to get it all joined up, and I need to bring Data into our existing BI analytics.

 

Any suggestions on what I could be doing wrong would be greatly appreciated. 

 

Many thanks

Nicola

 

 

Hi Nicola Wall,

 

Could you please provide Postman results and specify if another authentification through OData was successful? Any additional details on the issue are appreciated!

 

Also, could you please double-check the HTTP request that nothing is missed? 

 

Regards,

Anastasiia

Show all comments

Trying to GET data from creatio using API

Can someone help please, I have been through as much documentation as I can find and nothing is helping. 

I feel something is missing from our site.

 

Background

We installed Creatio Cloud earlier this year, through a partner Webrixs and we have set up the site ourselves. 

I want to use Power BI to call data from Creatio to use in other areas for analysis.

 

I can not authorise through Power Bi, getting "Method Not Allowed. (Method Not Allowed)"

Authorised through PostMan however, I am having difficulties defining the ENDPOINTS.

 

Can someone advise please?

Like 0

Like

9 comments

Hello Nicola,

 

Endpoints can be found directly in the source code of the service you are calling (basically it should be some method). For example in the source code below:

namespace Terrasoft.Configuration.UsrCustomNamespace
{
    using System;
    using System.ServiceModel;
    using System.ServiceModel.Web;
    using System.ServiceModel.Activation;
    using Terrasoft.Core;
    using Terrasoft.Web.Common;
    using Terrasoft.Core.Entities; 
 
    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class UsrCustomConfigurationService: BaseService
    {
 
 
        // Method returning contact identifier by name.
        [OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped,
        ResponseFormat = WebMessageFormat.Json)]
        public string GetContactIdByName(string Name) {
            // Default result.
            var result = "";
            // The EntitySchemaQuery instance, addressing the Contact database table.
            var esq = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "Contact");
            // Adding columns to query.
            var colId = esq.AddColumn("Id");
            var colName = esq.AddColumn("Name");
            // Filtering query data.
            var esqFilter = esq.CreateFilterWithParameters(FilterComparisonType.Equal, "Name", Name);
            esq.Filters.Add(esqFilter);
            // Receiving query results.
            var entities = esq.GetEntityCollection(UserConnection);
            // If the data are received.
            if (entities.Count > 0)
            {
                // Return the "Id" column value of the first record of the query result.
                result = entities[0].GetColumnValue(colId.Name).ToString();
                // You can also use the below variant:
                // result = entities[0].GetTypedColumnValue<string>(colId.Name);
            }
            // Return result.
            return result;
        }
    }
}
GetContactIdByName is an endpoint for the UsrCustomConfigurationService service which allows recieveing the 
Name parameter value in it.

Please review the source code of your web-services so to find out endpoints of these services.

 

Best regards,

Oscar

Oscar Dylan,

 

Thank you for responding to my query.

 

I have reviewed our source code, however, there is no service name for what I need. 

This may sound odd, or I may be looking at it wrong?

 

namespace Terrasoft.Configuration
{
 
	using DataContract = Terrasoft.Nui.ServiceModel.DataContract;
	using Newtonsoft.Json;
	using Newtonsoft.Json.Linq;
	using System;
	using System.Collections.Generic;
	using System.Collections.ObjectModel;
	using System.Data;
	using System.Drawing;
	using System.Globalization;
	using System.IO;
	using System.Linq;
	using Terrasoft.Common;
	using Terrasoft.Common.Json;
	using Terrasoft.Configuration;
	using Terrasoft.Core;
	using Terrasoft.Core.Configuration;
	using Terrasoft.Core.DB;
	using Terrasoft.Core.DcmProcess;
	using Terrasoft.Core.Entities;
	using Terrasoft.Core.Factories;
	using Terrasoft.Core.Process;
	using Terrasoft.Core.Process.Configuration;
	using Terrasoft.GlobalSearch.Indexing;
	using Terrasoft.UI.WebControls.Controls;
	using Terrasoft.UI.WebControls.Utilities.Json.Converters;
 
	#region Class: #SchemaNameMacros#Schema

 

 

Nicola Wall,

 

You seems to look at the base Terrasoft.Configuration source code because a custom web-service should have some name in the Terrasoft.Configuration namespace (like Terrasoft.Configuration.UsrCustomNamespace). Also the code should contain more rows in it since you have an opening { symbol, but there is no } symbol to close the namespace declaration.

 

Best regards,

Oscar

Oscar Dylan,

 

Thank you Oscar, the code is longer, please see below. I just took the top snippet.

 

I'm trying to get specific information from the Account.

I need the UsrCompanyURL

 

As a Test, I tried Terrasoft.Configuration.UsrCustomNamespace, but that gives me a '400 Bad Request'

 

{{BaseURI}}/0/ServiceModel/EntityDataService.svc/UsrCustomNamespace/GetContactIdByName=6089

This is an actual name I am requesting

namespace Terrasoft.Configuration
{
 
	using DataContract = Terrasoft.Nui.ServiceModel.DataContract;
	using Newtonsoft.Json;
	using Newtonsoft.Json.Linq;
	using System;
	using System.Collections.Generic;
	using System.Collections.ObjectModel;
	using System.Data;
	using System.Drawing;
	using System.Globalization;
	using System.IO;
	using System.Linq;
	using Terrasoft.Common;
	using Terrasoft.Common.Json;
	using Terrasoft.Configuration;
	using Terrasoft.Core;
	using Terrasoft.Core.Configuration;
	using Terrasoft.Core.DB;
	using Terrasoft.Core.DcmProcess;
	using Terrasoft.Core.Entities;
	using Terrasoft.Core.Factories;
	using Terrasoft.Core.Process;
	using Terrasoft.Core.Process.Configuration;
	using Terrasoft.GlobalSearch.Indexing;
	using Terrasoft.UI.WebControls.Controls;
	using Terrasoft.UI.WebControls.Utilities.Json.Converters;
 
	#region Class: #SchemaNameMacros#Schema
 
	/// <exclude/>
	public class #SchemaNameMacros#Schema : Terrasoft.Configuration.#ParentSchemaNameMacros#Schema
	{
 
		#region Constructors: Public
 
		public #SchemaNameMacros#Schema(EntitySchemaManager entitySchemaManager)
			: base(entitySchemaManager) {
		}
 
		public #SchemaNameMacros#Schema(#SchemaNameMacros#Schema source, bool isShallowClone)
			: base(source, isShallowClone) {
		}
 
		public #SchemaNameMacros#Schema(#SchemaNameMacros#Schema source)
			: base(source) {
		}
 
		#endregion
 
		#region Methods: Private
 
		private EntitySchemaIndex CreateIAccountAlternativeNameIndex() {
			EntitySchemaIndex index = new EntitySchemaIndex() {
				IsAutoName = false,
				IsClustered = false,
				IsUnique = false
			};
			index.UId = new Guid("ebe37f22-d03b-4ff5-85ab-b19cfd41de7b");
			index.Name = "IAccountAlternativeName";
			index.CreatedInSchemaUId = new Guid("b9b0db9a-65de-4b97-aece-47ffe851884b");
			index.ModifiedInSchemaUId = new Guid("b9b0db9a-65de-4b97-aece-47ffe851884b");
			index.CreatedInPackageId = new Guid("b6327e89-1dee-4b6f-a695-226c016beae1");
			EntitySchemaIndexColumn alternativeNameIndexColumn = new EntitySchemaIndexColumn() {
				UId = new Guid("58081ad2-6e01-4b09-8a7f-d6e550fd4d71"),
				ColumnUId = new Guid("e36ae687-347d-4bf7-b260-90129862e357"),
				CreatedInSchemaUId = new Guid("b9b0db9a-65de-4b97-aece-47ffe851884b"),
				ModifiedInSchemaUId = new Guid("b9b0db9a-65de-4b97-aece-47ffe851884b"),
				CreatedInPackageId = new Guid("b6327e89-1dee-4b6f-a695-226c016beae1"),
				OrderDirection = OrderDirectionStrict.Ascending
			};
			index.Columns.Add(alternativeNameIndexColumn);
			return index;
		}
 
		#endregion
 
		#region Methods: Protected
 
		protected override void InitializeProperties() {
			base.InitializeProperties();
			RealUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a");
			Name = "#SchemaNameMacros#";
			ParentSchemaUId = new Guid("25d7c1ab-1de0-4501-b402-02e0e5a72d6e");
			ExtendParent = true;
			CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a");
			IsDBView = false;
			UseDenyRecordRights = false;
			UseRecordDeactivation = false;
		}
 
		protected override void InitializeColumns() {
			base.InitializeColumns();
			if (Columns.FindByUId(new Guid("a7e02dfb-cba5-410e-8fa4-9adfc0e3c01a")) == null) {
				Columns.Add(CreateUsrLicenceStructureColumn());
			}
			if (Columns.FindByUId(new Guid("3b8ecd2d-6cee-4651-8611-2d4b806fd4b4")) == null) {
				Columns.Add(CreateUsrNumberOfProjectsColumn());
			}
			if (Columns.FindByUId(new Guid("27c4101c-6096-4fff-a635-6fc2464e0336")) == null) {
				Columns.Add(CreateUsrCompanyURLColumn());
			}
			if (Columns.FindByUId(new Guid("ad7c5fad-7f95-4f38-8955-f0888b07284b")) == null) {
				Columns.Add(CreateUsrAccountCurrencyColumn());
			}
			if (Columns.FindByUId(new Guid("53dca450-d360-4d49-a3c9-8644fdc8555d")) == null) {
				Columns.Add(CreateUsrVATNumberColumn());
			}
			if (Columns.FindByUId(new Guid("be8b74db-7fd8-44ef-8245-1923ca2f75dd")) == null) {
				Columns.Add(CreateUsrInvoiceEmailAddressColumn());
			}
			if (Columns.FindByUId(new Guid("2d33b423-41ac-4cfa-96dc-82c6be56d2cd")) == null) {
				Columns.Add(CreateUsrLicenceStartDateColumn());
			}
			if (Columns.FindByUId(new Guid("50ae14b4-d6bf-46b4-97f6-c0a0ca788a46")) == null) {
				Columns.Add(CreateUsrLicenceEndDateColumn());
			}
			if (Columns.FindByUId(new Guid("bfcf81d6-2b80-4a74-ae2c-1a224e9a7129")) == null) {
				Columns.Add(CreateUsrPaymentTermInDaysColumn());
			}
			if (Columns.FindByUId(new Guid("e46b1286-2972-409c-947a-7f49d832399a")) == null) {
				Columns.Add(CreateUsrOwnerOfficeAccountColumn());
			}
			if (Columns.FindByUId(new Guid("b3edd4e7-49d2-48f7-b136-adda6dfa1705")) == null) {
				Columns.Add(CreateUsrSpinoffCompanyAccountColumn());
			}
			if (Columns.FindByUId(new Guid("4f9eaf8d-da8a-4119-9e55-0b4e82797c0e")) == null) {
				Columns.Add(CreateUsrCurrentlicenceValueDecColumn());
			}
			if (Columns.FindByUId(new Guid("99671b76-06f6-4cd3-bb72-e49ec69b02c6")) == null) {
				Columns.Add(CreateUsrForecastDecColumn());
			}
			if (Columns.FindByUId(new Guid("366ba9b7-81eb-42ac-b432-47faaa5800bd")) == null) {
				Columns.Add(CreateUsrProjectSetupColumn());
			}
			if (Columns.FindByUId(new Guid("4fed2299-508f-4678-ad87-52445119af33")) == null) {
				Columns.Add(CreateUsrHasDealsColumn());
			}
			if (Columns.FindByUId(new Guid("7afad3b7-91bf-42ee-af3a-ad5a0c6dd86b")) == null) {
				Columns.Add(CreateUsrUsingPlatformColumn());
			}
			if (Columns.FindByUId(new Guid("0080f4a1-2d25-4ef4-803a-c4fa94d121c8")) == null) {
				Columns.Add(CreateUsrCustomerStatusColumn());
			}
			if (Columns.FindByUId(new Guid("87f2364b-4caf-4366-8bca-cc876ea2cc59")) == null) {
				Columns.Add(CreateUsrNoProjectsinLicenceIntColumn());
			}
			if (Columns.FindByUId(new Guid("d5e5a8de-e5d6-4acd-b501-cbd2713b2d1b")) == null) {
				Columns.Add(CreateUsrContractTermIntColumn());
			}
			if (Columns.FindByUId(new Guid("02cfcf0e-ccd4-4c41-adc4-6474e1ae4852")) == null) {
				Columns.Add(CreateUsrAccountNotesColumn());
			}
		}
 
		protected override EntitySchemaColumn CreateIdColumn() {
			EntitySchemaColumn column = base.CreateIdColumn();
			column.UsageType = EntitySchemaColumnUsageType.General;
			column.ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a");
			return column;
		}
 
		protected override EntitySchemaColumn CreateCreatedOnColumn() {
			EntitySchemaColumn column = base.CreateCreatedOnColumn();
			column.UsageType = EntitySchemaColumnUsageType.General;
			column.ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a");
			return column;
		}
 
		protected override EntitySchemaColumn CreateCreatedByColumn() {
			EntitySchemaColumn column = base.CreateCreatedByColumn();
			column.UsageType = EntitySchemaColumnUsageType.General;
			column.ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a");
			return column;
		}
 
		protected override EntitySchemaColumn CreateModifiedOnColumn() {
			EntitySchemaColumn column = base.CreateModifiedOnColumn();
			column.UsageType = EntitySchemaColumnUsageType.General;
			column.ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a");
			return column;
		}
 
		protected override EntitySchemaColumn CreateModifiedByColumn() {
			EntitySchemaColumn column = base.CreateModifiedByColumn();
			column.UsageType = EntitySchemaColumnUsageType.General;
			column.ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a");
			return column;
		}
 
		protected override EntitySchemaColumn CreateProcessListenersColumn() {
			EntitySchemaColumn column = base.CreateProcessListenersColumn();
			column.UsageType = EntitySchemaColumnUsageType.General;
			column.ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a");
			return column;
		}
 
		protected override EntitySchemaColumn CreateTypeColumn() {
			EntitySchemaColumn column = base.CreateTypeColumn();
			column.DefValue = new EntitySchemaColumnDef() {
				Source = EntitySchemaColumnDefSource.Const,
				ValueSource = @"03a75490-53e6-df11-971b-001d60e938c6"
			};
			column.ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a");
			return column;
		}
 
		protected override EntitySchemaColumn CreateNotesColumn() {
			EntitySchemaColumn column = base.CreateNotesColumn();
			column.UsageType = EntitySchemaColumnUsageType.General;
			column.ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a");
			return column;
		}
 
		protected override EntitySchemaColumn CreateGPSNColumn() {
			EntitySchemaColumn column = base.CreateGPSNColumn();
			column.UsageType = EntitySchemaColumnUsageType.General;
			column.ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a");
			return column;
		}
 
		protected override EntitySchemaColumn CreateGPSEColumn() {
			EntitySchemaColumn column = base.CreateGPSEColumn();
			column.UsageType = EntitySchemaColumnUsageType.General;
			column.ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a");
			return column;
		}
 
		protected virtual EntitySchemaColumn CreateUsrLicenceStructureColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Lookup")) {
				UId = new Guid("a7e02dfb-cba5-410e-8fa4-9adfc0e3c01a"),
				Name = @"UsrLicenceStructure",
				ReferenceSchemaUId = new Guid("11708efa-3c33-4f2a-b6ee-7c9d10c75e4d"),
				IsValueCloneable = false,
				IsIndexed = true,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a"),
				IsSimpleLookup = true
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrNumberOfProjectsColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Text")) {
				UId = new Guid("3b8ecd2d-6cee-4651-8611-2d4b806fd4b4"),
				Name = @"UsrNumberOfProjects",
				IsValueCloneable = false,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrCompanyURLColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("MediumText")) {
				UId = new Guid("27c4101c-6096-4fff-a635-6fc2464e0336"),
				Name = @"UsrCompanyURL",
				IsValueCloneable = false,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrAccountCurrencyColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Lookup")) {
				UId = new Guid("ad7c5fad-7f95-4f38-8955-f0888b07284b"),
				Name = @"UsrAccountCurrency",
				ReferenceSchemaUId = new Guid("2d36aca6-5b8c-4122-9648-baf3b7f8256d"),
				IsValueCloneable = false,
				IsIndexed = true,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a"),
				IsSimpleLookup = true
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrVATNumberColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Text")) {
				UId = new Guid("53dca450-d360-4d49-a3c9-8644fdc8555d"),
				Name = @"UsrVATNumber",
				IsValueCloneable = false,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrInvoiceEmailAddressColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Text")) {
				UId = new Guid("be8b74db-7fd8-44ef-8245-1923ca2f75dd"),
				Name = @"UsrInvoiceEmailAddress",
				IsValueCloneable = false,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrLicenceStartDateColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Date")) {
				UId = new Guid("2d33b423-41ac-4cfa-96dc-82c6be56d2cd"),
				Name = @"UsrLicenceStartDate",
				IsValueCloneable = false,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrLicenceEndDateColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Date")) {
				UId = new Guid("50ae14b4-d6bf-46b4-97f6-c0a0ca788a46"),
				Name = @"UsrLicenceEndDate",
				IsValueCloneable = false,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrPaymentTermInDaysColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Text")) {
				UId = new Guid("bfcf81d6-2b80-4a74-ae2c-1a224e9a7129"),
				Name = @"UsrPaymentTermInDays",
				IsValueCloneable = false,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrOwnerOfficeAccountColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Lookup")) {
				UId = new Guid("e46b1286-2972-409c-947a-7f49d832399a"),
				Name = @"UsrOwnerOfficeAccount",
				ReferenceSchemaUId = new Guid("25d7c1ab-1de0-4501-b402-02e0e5a72d6e"),
				IsValueCloneable = false,
				IsIndexed = true,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a"),
				IsSimpleLookup = true,
				DefValue = new EntitySchemaColumnDef() {
					Source = EntitySchemaColumnDefSource.SystemValue,
					ValueSource = SystemValueManager.GetInstanceByName(@"CurrentUserAccount")
				}
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrSpinoffCompanyAccountColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Lookup")) {
				UId = new Guid("b3edd4e7-49d2-48f7-b136-adda6dfa1705"),
				Name = @"UsrSpinoffCompanyAccount",
				ReferenceSchemaUId = new Guid("25d7c1ab-1de0-4501-b402-02e0e5a72d6e"),
				IsValueCloneable = false,
				IsIndexed = true,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a"),
				IsSimpleLookup = true
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrCurrentlicenceValueDecColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Float2")) {
				UId = new Guid("4f9eaf8d-da8a-4119-9e55-0b4e82797c0e"),
				Name = @"UsrCurrentlicenceValueDec",
				IsValueCloneable = false,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrForecastDecColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Float2")) {
				UId = new Guid("99671b76-06f6-4cd3-bb72-e49ec69b02c6"),
				Name = @"UsrForecastDec",
				IsValueCloneable = false,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrProjectSetupColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Lookup")) {
				UId = new Guid("366ba9b7-81eb-42ac-b432-47faaa5800bd"),
				Name = @"UsrProjectSetup",
				ReferenceSchemaUId = new Guid("551cb8ae-3a49-4016-acf2-1ea81c84b6c8"),
				IsValueCloneable = false,
				IsIndexed = true,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrHasDealsColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Boolean")) {
				UId = new Guid("4fed2299-508f-4678-ad87-52445119af33"),
				Name = @"UsrHasDeals",
				IsValueCloneable = false,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrUsingPlatformColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Lookup")) {
				UId = new Guid("7afad3b7-91bf-42ee-af3a-ad5a0c6dd86b"),
				Name = @"UsrUsingPlatform",
				ReferenceSchemaUId = new Guid("91bda100-4fb7-4008-9a1a-2da33c0fcd0e"),
				IsValueCloneable = false,
				IsIndexed = true,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a"),
				IsSimpleLookup = true
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrCustomerStatusColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Lookup")) {
				UId = new Guid("0080f4a1-2d25-4ef4-803a-c4fa94d121c8"),
				Name = @"UsrCustomerStatus",
				ReferenceSchemaUId = new Guid("981fad1e-60a9-4bc5-9f88-6b9d7ca05d29"),
				IsValueCloneable = false,
				IsIndexed = true,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a"),
				IsSimpleLookup = true
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrNoProjectsinLicenceIntColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Integer")) {
				UId = new Guid("87f2364b-4caf-4366-8bca-cc876ea2cc59"),
				Name = @"UsrNoProjectsinLicenceInt",
				IsValueCloneable = false,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrContractTermIntColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Integer")) {
				UId = new Guid("d5e5a8de-e5d6-4acd-b501-cbd2713b2d1b"),
				Name = @"UsrContractTermInt",
				IsValueCloneable = false,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected virtual EntitySchemaColumn CreateUsrAccountNotesColumn() {
			return new EntitySchemaColumn(this, DataValueTypeManager.GetInstanceByName("Text")) {
				UId = new Guid("02cfcf0e-ccd4-4c41-adc4-6474e1ae4852"),
				Name = @"UsrAccountNotes",
				IsValueCloneable = false,
				CreatedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				ModifiedInSchemaUId = new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"),
				CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a")
			};
		}
 
		protected override void InitializeMethods() {
			base.InitializeMethods();
			SetMethodsDefInheritance();
		}
 
		protected override void InitializeIndexes() {
			base.InitializeIndexes();
			Indexes.Add(CreateIAccountAlternativeNameIndex());
		}
 
		protected override void InitializeEventsProcessSchema() {
			EventsProcessSchema = Create#SchemaNameMacros#EventsProcessSchema();
		}
 
		protected virtual ProcessSchema Create#SchemaNameMacros#EventsProcessSchema() {
			var schema = new #SchemaNameMacros#EventsProcessSchema(ProcessSchemaManager, this);
			schema.InitializePrimaryInfo();
			return schema;
		}
 
		#endregion
 
		#region Methods: Public
 
		public override Entity CreateEntity(UserConnection userConnection) {
			return new #SchemaNameMacros#(userConnection) {Schema = this};
		}
 
		public override EmbeddedProcess CreateEventsProcess(UserConnection userConnection) {
			return new #SchemaNameMacros#EventsProcess(userConnection);
		}
 
		public override object Clone() {
			return new #SchemaNameMacros#Schema(this);
		}
 
		public override EntitySchema CloneShallow() {
			return new #SchemaNameMacros#Schema(this, true);
		}
 
		public override void GetParentRealUIds(Collection<Guid> realUIds) {
			base.GetParentRealUIds(realUIds);
			realUIds.Add(new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a"));
		}
 
		#endregion
 
	}
 
	#endregion
 
	#region Class: #SchemaNameMacros#
 
	/// <summary>
	/// Account.
	/// </summary>
	public class #SchemaNameMacros# : Terrasoft.Configuration.#ParentSchemaNameMacros#
	{
 
		#region Constructors: Public
 
		public #SchemaNameMacros#(UserConnection userConnection)
			: base(userConnection) {
			SchemaName = "#SchemaNameMacros#";
		}
 
		public #SchemaNameMacros#(#SchemaNameMacros# source)
			: base(source) {
		}
 
		#endregion
 
		#region Properties: Public
 
		/// <exclude/>
		public Guid UsrLicenceStructureId {
			get {
				return GetTypedColumnValue<Guid>("UsrLicenceStructureId");
			}
			set {
				SetColumnValue("UsrLicenceStructureId", value);
				_usrLicenceStructure = null;
			}
		}
 
		/// <exclude/>
		public string UsrLicenceStructureName {
			get {
				return GetTypedColumnValue<string>("UsrLicenceStructureName");
			}
			set {
				SetColumnValue("UsrLicenceStructureName", value);
				if (_usrLicenceStructure != null) {
					_usrLicenceStructure.Name = value;
				}
			}
		}
 
		private UsrLicenceStructure _usrLicenceStructure;
		/// <summary>
		/// Licence Structure.
		/// </summary>
		public UsrLicenceStructure UsrLicenceStructure {
			get {
				return _usrLicenceStructure ??
					(_usrLicenceStructure = LookupColumnEntities.GetEntity("UsrLicenceStructure") as UsrLicenceStructure);
			}
		}
 
		/// <summary>
		/// Number of Projects.
		/// </summary>
		public string UsrNumberOfProjects {
			get {
				return GetTypedColumnValue<string>("UsrNumberOfProjects");
			}
			set {
				SetColumnValue("UsrNumberOfProjects", value);
			}
		}
 
		/// <summary>
		/// RDrive Company URL.
		/// </summary>
		public string UsrCompanyURL {
			get {
				return GetTypedColumnValue<string>("UsrCompanyURL");
			}
			set {
				SetColumnValue("UsrCompanyURL", value);
			}
		}
 
		/// <exclude/>
		public Guid UsrAccountCurrencyId {
			get {
				return GetTypedColumnValue<Guid>("UsrAccountCurrencyId");
			}
			set {
				SetColumnValue("UsrAccountCurrencyId", value);
				_usrAccountCurrency = null;
			}
		}
 
		/// <exclude/>
		public string UsrAccountCurrencyName {
			get {
				return GetTypedColumnValue<string>("UsrAccountCurrencyName");
			}
			set {
				SetColumnValue("UsrAccountCurrencyName", value);
				if (_usrAccountCurrency != null) {
					_usrAccountCurrency.Name = value;
				}
			}
		}
 
		private Currency _usrAccountCurrency;
		/// <summary>
		/// Currency.
		/// </summary>
		public Currency UsrAccountCurrency {
			get {
				return _usrAccountCurrency ??
					(_usrAccountCurrency = LookupColumnEntities.GetEntity("UsrAccountCurrency") as Currency);
			}
		}
 
		/// <summary>
		/// VAT Number.
		/// </summary>
		public string UsrVATNumber {
			get {
				return GetTypedColumnValue<string>("UsrVATNumber");
			}
			set {
				SetColumnValue("UsrVATNumber", value);
			}
		}
 
		/// <summary>
		/// Invoice email address.
		/// </summary>
		public string UsrInvoiceEmailAddress {
			get {
				return GetTypedColumnValue<string>("UsrInvoiceEmailAddress");
			}
			set {
				SetColumnValue("UsrInvoiceEmailAddress", value);
			}
		}
 
		/// <summary>
		/// Licence Start Date.
		/// </summary>
		public DateTime UsrLicenceStartDate {
			get {
				return GetTypedColumnValue<DateTime>("UsrLicenceStartDate");
			}
			set {
				SetColumnValue("UsrLicenceStartDate", value);
			}
		}
 
		/// <summary>
		/// Licence End Date.
		/// </summary>
		public DateTime UsrLicenceEndDate {
			get {
				return GetTypedColumnValue<DateTime>("UsrLicenceEndDate");
			}
			set {
				SetColumnValue("UsrLicenceEndDate", value);
			}
		}
 
		/// <summary>
		/// Payment Term in days.
		/// </summary>
		public string UsrPaymentTermInDays {
			get {
				return GetTypedColumnValue<string>("UsrPaymentTermInDays");
			}
			set {
				SetColumnValue("UsrPaymentTermInDays", value);
			}
		}
 
		/// <exclude/>
		public Guid UsrOwnerOfficeAccountId {
			get {
				return GetTypedColumnValue<Guid>("UsrOwnerOfficeAccountId");
			}
			set {
				SetColumnValue("UsrOwnerOfficeAccountId", value);
				_usrOwnerOfficeAccount = null;
			}
		}
 
		/// <exclude/>
		public string UsrOwnerOfficeAccountName {
			get {
				return GetTypedColumnValue<string>("UsrOwnerOfficeAccountName");
			}
			set {
				SetColumnValue("UsrOwnerOfficeAccountName", value);
				if (_usrOwnerOfficeAccount != null) {
					_usrOwnerOfficeAccount.Name = value;
				}
			}
		}
 
		private Account _usrOwnerOfficeAccount;
		/// <summary>
		/// Owner Office.
		/// </summary>
		public Account UsrOwnerOfficeAccount {
			get {
				return _usrOwnerOfficeAccount ??
					(_usrOwnerOfficeAccount = LookupColumnEntities.GetEntity("UsrOwnerOfficeAccount") as Account);
			}
		}
 
		/// <exclude/>
		public Guid UsrSpinoffCompanyAccountId {
			get {
				return GetTypedColumnValue<Guid>("UsrSpinoffCompanyAccountId");
			}
			set {
				SetColumnValue("UsrSpinoffCompanyAccountId", value);
				_usrSpinoffCompanyAccount = null;
			}
		}
 
		/// <exclude/>
		public string UsrSpinoffCompanyAccountName {
			get {
				return GetTypedColumnValue<string>("UsrSpinoffCompanyAccountName");
			}
			set {
				SetColumnValue("UsrSpinoffCompanyAccountName", value);
				if (_usrSpinoffCompanyAccount != null) {
					_usrSpinoffCompanyAccount.Name = value;
				}
			}
		}
 
		private Account _usrSpinoffCompanyAccount;
		/// <summary>
		/// Spin-off Company.
		/// </summary>
		public Account UsrSpinoffCompanyAccount {
			get {
				return _usrSpinoffCompanyAccount ??
					(_usrSpinoffCompanyAccount = LookupColumnEntities.GetEntity("UsrSpinoffCompanyAccount") as Account);
			}
		}
 
		/// <summary>
		/// Current Licence Value.
		/// </summary>
		public Decimal UsrCurrentlicenceValueDec {
			get {
				return GetTypedColumnValue<Decimal>("UsrCurrentlicenceValueDec");
			}
			set {
				SetColumnValue("UsrCurrentlicenceValueDec", value);
			}
		}
 
		/// <summary>
		/// Forecast.
		/// </summary>
		public Decimal UsrForecastDec {
			get {
				return GetTypedColumnValue<Decimal>("UsrForecastDec");
			}
			set {
				SetColumnValue("UsrForecastDec", value);
			}
		}
 
		/// <exclude/>
		public Guid UsrProjectSetupId {
			get {
				return GetTypedColumnValue<Guid>("UsrProjectSetupId");
			}
			set {
				SetColumnValue("UsrProjectSetupId", value);
				_usrProjectSetup = null;
			}
		}
 
		/// <exclude/>
		public string UsrProjectSetupName {
			get {
				return GetTypedColumnValue<string>("UsrProjectSetupName");
			}
			set {
				SetColumnValue("UsrProjectSetupName", value);
				if (_usrProjectSetup != null) {
					_usrProjectSetup.Name = value;
				}
			}
		}
 
		private UsrProjectSetup _usrProjectSetup;
		/// <summary>
		/// Project Setup.
		/// </summary>
		public UsrProjectSetup UsrProjectSetup {
			get {
				return _usrProjectSetup ??
					(_usrProjectSetup = LookupColumnEntities.GetEntity("UsrProjectSetup") as UsrProjectSetup);
			}
		}
 
		/// <summary>
		/// Has Deals.
		/// </summary>
		public bool UsrHasDeals {
			get {
				return GetTypedColumnValue<bool>("UsrHasDeals");
			}
			set {
				SetColumnValue("UsrHasDeals", value);
			}
		}
 
		/// <exclude/>
		public Guid UsrUsingPlatformId {
			get {
				return GetTypedColumnValue<Guid>("UsrUsingPlatformId");
			}
			set {
				SetColumnValue("UsrUsingPlatformId", value);
				_usrUsingPlatform = null;
			}
		}
 
		/// <exclude/>
		public string UsrUsingPlatformName {
			get {
				return GetTypedColumnValue<string>("UsrUsingPlatformName");
			}
			set {
				SetColumnValue("UsrUsingPlatformName", value);
				if (_usrUsingPlatform != null) {
					_usrUsingPlatform.Name = value;
				}
			}
		}
 
		private UsrUsingPlatform _usrUsingPlatform;
		/// <summary>
		/// Using Platform.
		/// </summary>
		public UsrUsingPlatform UsrUsingPlatform {
			get {
				return _usrUsingPlatform ??
					(_usrUsingPlatform = LookupColumnEntities.GetEntity("UsrUsingPlatform") as UsrUsingPlatform);
			}
		}
 
		/// <exclude/>
		public Guid UsrCustomerStatusId {
			get {
				return GetTypedColumnValue<Guid>("UsrCustomerStatusId");
			}
			set {
				SetColumnValue("UsrCustomerStatusId", value);
				_usrCustomerStatus = null;
			}
		}
 
		/// <exclude/>
		public string UsrCustomerStatusName {
			get {
				return GetTypedColumnValue<string>("UsrCustomerStatusName");
			}
			set {
				SetColumnValue("UsrCustomerStatusName", value);
				if (_usrCustomerStatus != null) {
					_usrCustomerStatus.Name = value;
				}
			}
		}
 
		private UsrCustomerStatus _usrCustomerStatus;
		/// <summary>
		/// Customer Status.
		/// </summary>
		public UsrCustomerStatus UsrCustomerStatus {
			get {
				return _usrCustomerStatus ??
					(_usrCustomerStatus = LookupColumnEntities.GetEntity("UsrCustomerStatus") as UsrCustomerStatus);
			}
		}
 
		/// <summary>
		/// No. Projects in Licence.
		/// </summary>
		public int UsrNoProjectsinLicenceInt {
			get {
				return GetTypedColumnValue<int>("UsrNoProjectsinLicenceInt");
			}
			set {
				SetColumnValue("UsrNoProjectsinLicenceInt", value);
			}
		}
 
		/// <summary>
		/// Contract term (in years).
		/// </summary>
		public int UsrContractTermInt {
			get {
				return GetTypedColumnValue<int>("UsrContractTermInt");
			}
			set {
				SetColumnValue("UsrContractTermInt", value);
			}
		}
 
		/// <summary>
		/// Account Notes.
		/// </summary>
		public string UsrAccountNotes {
			get {
				return GetTypedColumnValue<string>("UsrAccountNotes");
			}
			set {
				SetColumnValue("UsrAccountNotes", value);
			}
		}
 
		#endregion
 
		#region Methods: Protected
 
		protected override Process InitializeEmbeddedProcess() {
			var process = new #SchemaNameMacros#EventsProcess(UserConnection);
			process.Entity = this;
			return process;
		}
 
		#endregion
 
		#region Methods: Protected
 
		protected override void InitializeThrowEvents() {
			base.InitializeThrowEvents();
		}
 
		#endregion
 
		#region Methods: Public
 
		public override object Clone() {
			return new #SchemaNameMacros#(this);
		}
 
		#endregion
 
	}
 
	#endregion
 
	#region Class: #SchemaNameMacros#EventsProcess
 
	/// <exclude/>
	public partial class #SchemaNameMacros#EventsProcess<TEntity> : Terrasoft.Configuration.#ParentSchemaNameMacros#EventsProcess<TEntity> where TEntity : #SchemaNameMacros#
	{
 
		public #SchemaNameMacros#EventsProcess(UserConnection userConnection)
			: base(userConnection) {
			InitializeMetaPathParameterValues();
			UId = Guid.NewGuid();
			Name = "#SchemaNameMacros#EventsProcess";
			SchemaManagerName = "EntitySchemaManager";
			SerializeToDB = false;
			IsLogging = false;
			InitializeFlowElements();
		}
 
		#region Properties: Private
 
		private Guid InternalSchemaUId {
			get {
				return new Guid("2592255a-1a9e-4805-8d04-2e46c2120c4a");
			}
		}
 
		#endregion
 
		#region Properties: Public
 
		public override string InstanceUId {
			get {
				return Entity.InstanceUId.ToString();
			}
		}
 
		#endregion
 
		#region Methods: Private
 
		private void InitializeFlowElements() {
		}
 
		private void OnExecuted(object sender, ProcessActivityAfterEventArgs e) {
			ProcessQueue(e.Context);
		}
 
		#endregion
 
		#region Methods: Protected
 
		protected override void PrepareStart(ProcessExecutingContext context) {
			base.PrepareStart(context);
			context.Process = this;
		}
 
		protected override bool ProcessQueue(ProcessExecutingContext context) {
			bool result = base.ProcessQueue(context);
			if (context.QueueTasks.Count == 0) {
				return result;
			}
			if (!result && context.QueueTasks.Count > 0) {
				ProcessQueue(context);
			}
			return result;
		}
 
		protected override void CompleteApplyingFlowElementsPropertiesData() {
			base.CompleteApplyingFlowElementsPropertiesData();
			foreach (var item in FlowElements) {
				foreach (var itemValue in item.Value) {
					if (Guid.Equals(itemValue.CreatedInSchemaUId, InternalSchemaUId)) {
						itemValue.ExecutedEventHandler = OnExecuted;
					}
				}
			}
		}
 
		#endregion
 
		#region Methods: Public
 
		public override void ThrowEvent(ProcessExecutingContext context, string message) {
			base.ThrowEvent(context, message);
			ProcessQueue(context);
		}
 
		public override void WritePropertiesData(DataWriter writer, bool writeFlowElements = true) {
			base.WritePropertiesData(writer, writeFlowElements);
		}
 
		public override object CloneShallow() {
			return base.CloneShallow();
		}
 
		#endregion
 
	}
 
	#endregion
 
	#region Class: #SchemaNameMacros#EventsProcess
 
	/// <exclude/>
	public class #SchemaNameMacros#EventsProcess : #SchemaNameMacros#EventsProcess<#SchemaNameMacros#>
	{
 
		public #SchemaNameMacros#EventsProcess(UserConnection userConnection)
			: base(userConnection) {
		}
 
	}
 
	#endregion
 
	#region Class: #SchemaNameMacros#EventsProcess
 
	public partial class #SchemaNameMacros#EventsProcess<TEntity>
	{
 
		#region Methods: Public
 
		#endregion
 
	}
 
	#endregion
 
	#region Class: #SchemaNameMacros#EventsProcessSchema
 
	/// <exclude/>
	public class #SchemaNameMacros#EventsProcessSchema : Terrasoft.Configuration.#ParentSchemaNameMacros#EventsProcessSchema
	{
 
		#region Constructors: Public
 
		public #SchemaNameMacros#EventsProcessSchema(ProcessSchemaManager processSchemaManager, ProcessBasedSchema ownerSchema)
			: base(processSchemaManager, ownerSchema) {
		}
 
		public #SchemaNameMacros#EventsProcessSchema(#SchemaNameMacros#EventsProcessSchema source)
			: base(source) {
		}
 
		#endregion
 
		#region Methods: Protected
 
		protected override void InitializeProperties() {
			base.InitializeProperties();
			Name = "#SchemaNameMacros#EventsProcess";
			UId = new Guid("6824274f-ce71-44a9-8f96-c74acc8a7f90");
			CreatedInPackageId = new Guid("b4f6ddca-8b56-4d67-b37c-83523d7b899a");
			CreatedInSchemaUId = Guid.Empty;
			CreatedInVersion = @"7.15.2.501";
			CultureName = null;
			EntitySchemaUId = Guid.Empty;
			ModifiedInSchemaUId = Guid.Empty;
			ParametersEditPageSchemaUId = Guid.Empty;
			ParentSchemaUId = new Guid("0f4f89bf-f369-4ab4-890e-8c8f5521752f");
			SequenceFlowStrokeDefColor = Color.FromArgb(-4473925);
			TaskFillDefColor = Color.FromArgb(-1);
			UsageType = ProcessSchemaUsageType.Advanced;
		}
 
		protected override void InitializeParameters() {
			base.InitializeParameters();
		}
 
		protected override void InitializeBaseElements() {
			base.InitializeBaseElements();
		}
 
		protected override void InitializeMethods() {
			base.InitializeMethods();
			SetMethodsDefInheritance();
		}
 
		protected override void InitializeUsings() {
			Usings.Add(new SchemaUsing() {
				UId = new Guid("fb7b81ba-7c3c-45a5-ae9e-c6c03dceb812"),
				Name = "Terrasoft.UI.WebControls.Controls",
				Alias = "",
				CreatedInPackageId = new Guid("66e9e705-64b4-4dda-925e-d1e05a389eb6")
			});
			Usings.Add(new SchemaUsing() {
				UId = new Guid("cde525cf-d220-4d2a-b963-e55254c639fc"),
				Name = "Terrasoft.UI.WebControls.Utilities.Json.Converters",
				Alias = "",
				CreatedInPackageId = new Guid("66e9e705-64b4-4dda-925e-d1e05a389eb6")
			});
			Usings.Add(new SchemaUsing() {
				UId = new Guid("5c9c82c6-ba6d-4a57-9a14-87fe8faa4ebb"),
				Name = "Terrasoft.Core.DB",
				Alias = "",
				CreatedInPackageId = new Guid("66e9e705-64b4-4dda-925e-d1e05a389eb6")
			});
			Usings.Add(new SchemaUsing() {
				UId = new Guid("7821de68-c82b-4917-a6cd-add2adfbe400"),
				Name = "Terrasoft.Common",
				Alias = "",
				CreatedInPackageId = new Guid("66e9e705-64b4-4dda-925e-d1e05a389eb6")
			});
			Usings.Add(new SchemaUsing() {
				UId = new Guid("d67de76f-9cbc-4bfc-babb-6f65cb89b973"),
				Name = "System.Data",
				Alias = "",
				CreatedInPackageId = new Guid("66e9e705-64b4-4dda-925e-d1e05a389eb6")
			});
			Usings.Add(new SchemaUsing() {
				UId = new Guid("74160d3b-65e3-4694-b554-089f2d980e54"),
				Name = "Newtonsoft.Json",
				Alias = "",
				CreatedInPackageId = new Guid("66e9e705-64b4-4dda-925e-d1e05a389eb6")
			});
			Usings.Add(new SchemaUsing() {
				UId = new Guid("e401300a-9f16-40c2-9788-cf310ae9d1c5"),
				Name = "Terrasoft.Common.Json",
				Alias = "",
				CreatedInPackageId = new Guid("66e9e705-64b4-4dda-925e-d1e05a389eb6")
			});
			Usings.Add(new SchemaUsing() {
				UId = new Guid("19435ec9-e585-4b01-a7b6-0a11d4877ad6"),
				Name = "Terrasoft.Configuration",
				Alias = "",
				CreatedInPackageId = new Guid("467e8661-453f-46e6-ab9a-2749b5699bb7")
			});
			Usings.Add(new SchemaUsing() {
				UId = new Guid("e7a7acf9-9ccf-4a9b-b612-ba2a5292290e"),
				Name = "System.Linq",
				Alias = "",
				CreatedInPackageId = new Guid("5603834c-d982-4f87-a976-a9411eeb30f3")
			});
			Usings.Add(new SchemaUsing() {
				UId = new Guid("d5bb3512-71e0-482a-9c7e-16bf22c586b7"),
				Name = "Terrasoft.Nui.ServiceModel.DataContract",
				Alias = "DataContract",
				CreatedInPackageId = new Guid("76eace8e-4a48-486b-bf04-de18fe06b0a2")
			});
			Usings.Add(new SchemaUsing() {
				UId = new Guid("b261d1c9-cc98-44e8-aabd-7806d1dc26ed"),
				Name = "Terrasoft.Core.Factories",
				Alias = "",
				CreatedInPackageId = new Guid("76eace8e-4a48-486b-bf04-de18fe06b0a2")
			});
			Usings.Add(new SchemaUsing() {
				UId = new Guid("c261d1c9-cc98-44e8-aabd-7806d1dc26ec"),
				Name = "Terrasoft.Core.DcmProcess",
				Alias = "",
				CreatedInPackageId = new Guid("76eace8e-4a48-486b-bf04-de18fe06b0a2")
			});
			Usings.Add(new SchemaUsing() {
				UId = new Guid("aca2294b-e209-4c40-9400-0d59d9ecd1ea"),
				Name = "Terrasoft.GlobalSearch.Indexing",
				Alias = "",
				CreatedInPackageId = new Guid("76eace8e-4a48-486b-bf04-de18fe06b0a2")
			});
		}
 
		#endregion
 
		#region Methods: Public
 
		public override object Clone() {
			return new #SchemaNameMacros#EventsProcessSchema(this);
		}
 
		public override void GetParentRealUIds(Collection<Guid> realUIds) {
			base.GetParentRealUIds(realUIds);
			realUIds.Add(new Guid("6824274f-ce71-44a9-8f96-c74acc8a7f90"));
		}
 
		#endregion
 
	}
 
	#endregion
 
}

 

Nicola Wall,

 

And how about this URL?

 

http://mysite.creatio.com/0/rest/UsrCustomNamespace/GetContactIdByName?…

 

Also please make sure that you've created the UsrCustomNamespace and the GetContactIdByName method there (because they are missing in your code). Here is a complete example of the service available here.

 

Best regards,

Oscar

Thank you for your support Oscar, 

 

http://mysite.creatio.com/0/rest/UsrCustomNamespace/GetContactIdByName?…

(config to our site before running) Brings back a '404 not found error'

 

The method is in the UsrCustomNameSpace and the GetContactIdByName source code

I have included the source code for the UsrCustomConfigurationService

 

What I sent previously was the source code for our Accounts, agree it isn't in there, but should I not get results from running the UsrCustomNameSpace

 

    using System;
    using System.ServiceModel;
    using System.ServiceModel.Web;
    using System.ServiceModel.Activation;
    using Terrasoft.Core;
    using Terrasoft.Web.Common;
    using Terrasoft.Core.Entities; 
 
    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class UsrCustomConfigurationService: BaseService
    {
 
 
        // Method returning contact identifier by name.
        [OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped,
        ResponseFormat = WebMessageFormat.Json)]
        public string GetContactIdByName(string Name) {
            // Default result.
            var result = "";
            // The EntitySchemaQuery instance, addressing the Contact database table.
            var esq = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "Contact");
            // Adding columns to query.
            var colId = esq.AddColumn("Id");
            var colName = esq.AddColumn("Name");
            // Filtering query data.
            var esqFilter = esq.CreateFilterWithParameters(FilterComparisonType.Equal, "Name", Name);
            esq.Filters.Add(esqFilter);
            // Receiving query results.
            var entities = esq.GetEntityCollection(UserConnection);
            // If the data are received.
            if (entities.Count > 0)
            {
                // Return the "Id" column value of the first record of the query result.
                result = entities[0].GetColumnValue(colId.Name).ToString();
                // You can also use the below variant:
                // result = entities[0].GetTypedColumnValue<string>(colId.Name);
            }
            // Return result.
            return result;
        }
    }
}

 

Nicola Wall,

 

Sorry, mistyping here - we need this link 

http(s)://sitename/0/rest/UsrCustomConfigurationService/GetContactIdByName?Name=Supervisor

 

because UsrCustomConfigurationService is a public class containing the GetContactIdByName method. This worked on my end:

Best regards,

Oscar

I'm still not having any luck, i'm afraid.

 

Would these errors haven't any relation? 

Oscar Dylan,

 

Thanks Oscar, 

 

I have now managed to Get oData through the browser, I can at least confirm the connection is correct.

 

For me to progress, I need to be able to pull the information into Power Bi and I am having difficulties there but will add a new post for this. 

 

Many thanks for your support. 

Show all comments

Hi,

I'm trying to call a bp from a webservice that doesn't use authentication so i'm following the example provided: 

https://community.bpmonline.com/articles/web-service-without-authorizat…

When i try to set the parameter of the  business process i get the following error: 

Terrasoft.Common.InvalidObjectStateException: missing property "UsrNewInsertedEntityId" of type "ProcessComponentSet"
var UserConnection = this.SystemUserConnection;
var manager = UserConnection.ProcessSchemaManager;
var processSchema = manager.GetInstanceByName("UsrIncomingEntity");
var process = processSchema.CreateProcess(UserConnection);
if (processSchema.Parameters.ExistsByName("usrNewInsertedEntityId"))
{
    process.SetPropertyValue("UsrNewInsertedEntityId", msgId);
}
process.Execute(UserConnection);

Do i need to set anything on the BP process property?

Like 1

Like

8 comments

Hi Luciano, 

Please advise if you created your UsrIncomingEntity business process beforehand and if you added the usrNewInsertedEntityId parameter into it. Make sure you do that first.

If you did it, kindly provide us with the whole code so that we could have a look into it and advise on possible errors.

Thanks

Hello Luciano,



Basically, the code should work in appropriate way. As S.Kobizka said, you should check that business process with code "UsrIncomingEntity" exists and has  "usrNewInsertedEntityId" parameter. 



Also, I recommend try to choose "compile all" option in configuration, it may help because source code will be regenerated.



If you will have further difficulties, please, send the entire code of webservice and screenshots of the businessprocess.



Regards,

Alex

Alex_Tim,

Hi,

Thank you both for the answer, the BP exists prior to the webservice as well as the parameter. If i debug the code both the bp and the parameter are available to inspect. As soon as the line:

process.SetPropertyValue("UsrNewInsertedEntityId", msgId);

is executed i get the error.

I'll try the compile all option and then retest to  see if that helps.

Thanks

Luciano De Munno,

 

It seems that the reason of the issue is that msgId variable and UsrNewInsertedEntityId parameter in business process have different types. Please make sure that msgId is Guid and UsrNewInsertedEntityId is unique identifier http://prntscr.com/n0yt77



Regards,

Alex

Alex_Tim,

Hi Alex,

Thank you for the answer, i checked and msgId is a Guid and the parameter UsrNewInsertedEntityId has the type "Unique Identifier". AS far as i know that's the correct type i can try chaning both the string and text and then converting to guid inside the process to see if that helps.

Same thing, now i'm sending a string and expecting a string but the error is the same. 

Hello Luciano,



Here is the example of how to start business process with parameter from server side code.

If you will have further difficulties, please contact support team support@bpmonline.com





using Terrasoft.Core;

using Terrasoft.Core.Process;

using Terrasoft.Core.Process.Configuration;

 

ProcessSchema schema = UserConnection.ProcessSchemaManager.GetInstanceByName("LeadManagement");

//schema = UserConnection.ProcessSchemaManager.GetInstanceByUId(leadManagementProcessUId);

 

//different engines for interpretable and compiled BP

bool canUseFlowEngine = ProcessSchemaManager.GetCanUseFlowEngine(UserConnection, schema);

if(canUseFlowEngine) {

    var flowEngine = new FlowEngine(UserConnection);

    var param = new Dictionary<string, string>();

    param["LeadId"] = Entity.Id.ToString();

    flowEngine.RunProcess(schema, param);

} else {

    Process process = schema.CreateProcess(UserConnection);

    process.SetPropertyValue("LeadId", Entity.Id);

    process.Execute(UserConnection);

}        

Hi Alex,

The FlowEngine part did the trick. Thank you so much

Show all comments

Hi,

I'm trying to create an anonymous we folllowing the guide from: 

https://academy.bpmonline.com/documents/technic-sdk/7-13/creating-anony…

The example provided is only for Verb GET and it works fine, but as soon as i change it to POST i get 403 code returned instead.

I tried changing different settings on the .config files to allow verb post but with no luck. What am i missing?

Is the system only meant to expose GET anonymous services?

Regards,

Luciano

Like 0

Like

5 comments

No. The system allows post requests. Probably you're trying to convert the GET request to the POST one. Please don't copy/paste. Write the service and the request manualy. This way you'll not make mistakes.

Hi Eugene,

Are you sure you are not talking about normal authenticated webservices?

It turns out that i had to add the svc path to DisableCsrfTokenValidationForPaths for the anonymous  in order to make it work.

Keep in mind that i need to call the POST method from outside bpm and without any authentication.

 

 

 

I'm sure. http://prntscr.com/myfefm

I tested without CSRF on localhost. 

That's not the behavior i'm seeing on my local environment. After creating the svc and registering the service on all the .config files i kept getting 403 until i enabled the path on DisableCsrfTokenValidationForPaths. Otherwise i was always getting 403.

I notice from you screenshot that you were also getting 403 before the 400 bad request,, did you change something?

 

Luciano De Munno,

Try to check how the GeneratedObjectWebFormService registered. It works with post and it seems like it doesn't require disabling CSRF.

>did you change something?

- I stoped copy-pasting and wrote the request manually from scratch. Anyway the request is on the screenshot. Please compare they on your own.

 

Show all comments

Hi,

The webservice i added to the configuration is failing, is there a way to see the outgoing POST request or at least check the complete response i'm getting from the server?

 

I'm using it trough a business process i need to know if the webservice is responding with codes other that 200 OK

Like 0

Like

2 comments

You can turn on tracing for the process. This will likely show you what is being received from the web service. To turn this on, select your process and click the properties button. Then, check the "Trace enabled" checkbox. Once you've done that, you can run the process and it will record additional information. To see this information, find the process in the process log and open it. Then, when you click steps in the process log, you will see a button for "View trace data"

Be sure you turn off tracing for the process when done since it does add additional overhead. 

Ryan

Dear Luciano, 

You can use the approach mentioned by Ryan, or you can use the response parameter right inside the business process, so to write response to other object or display as a notification. 

Lets say you have a web service element. You can create a new object in the system, e.g. CallServiceLog, which would have a text field and data (any other needed info). In the business process right after web service element, you can add Add data element, which would add a new record to the CallServiceLog object and will take response from web service element. Afterwards, you can create a lookup based onCallServiceLog object and check for responses.

http://prntscr.com/mzfqcp

Regards,

Anastasia

Show all comments

Hi,

Is there a way to package an anonymus webservice created using the guide from the academy?

https://academy.bpmonline.com/documents/technic-sdk/7-13/creating-anony…

I need to have a public endpoint to integrate with a texting app that notifies of messages realtime, but the endpoint cant have authentication. Is there any other way to expose a public endpoint?

 

Regards,

Luciano

Like 0

Like

5 comments

Hello Luciano,



Basically, to implement the anonymous webservice you should simply follow the instructions from the article that you sent. Anonymous webservice concept means that authentication is not a required step to interact with this service.

Also, if you use onsite version of bpm'online, don`t forget to register the service (there is an explanation how to do it in the article).

In case your site is located in cloud you should email support@bpmonline.com so the support team will help you with registration.



Best regards,

Alex

Alex_Tim,

Thank you for the answer, so the the package only contains the webservice class, the svc creation and .config changes are done by support, right?

Edit:

Additionally if also want to package this to make it available on the store, how would it work? do every customer that's bpm hosted needs to email support to get the webservice registered?

Regards,

Luciano

Luciano De Munno,

Hello, yes, you can create the webservice class in any package that you want.

Svc creation and changes in config should be done by support team. 



You can upload the package to the marketplace, but since changes should also be made in .config and svc files every customer will need to email support to register the webservice.



Best regards,

Alex

Alex_Tim,

Hi, do you know fi it's possible to use POST o r PUT instead of GET? whenever i put 

WebInvoke(Method = "POST") i keep getting 403

Luciano De Munno,

Hello! Error 403 means that there is no header with a CSRF token. To make a request using ARC, you need to add a header with a valid csrf token for the current session. You can get it, for example, by taking any post request from the network chrome tab. It is also better to put a header with cookies.

Read more about CSRF in the article:https://academy.bpmonline.com/documents/technic-sdk/7-13/protection-csrf-attacks-during-integration-bpmonline

Show all comments

When trying to call a web service from the BPM'Online platform, the process throws the following error: 

we assume that the error is due to the immense size of the JSON that we try to read from the external web service, so that the response would exceed the processing capacity limits of the webservice module of the bpm'online tool.

Our consulate is, if there is a way to increase the data processing limit of the bpm'online web service module in terms of reading the JSON delivered by the external web service.

We estimate that approximately 6 GB of RAM is needed to process the desired volume of data.

Like 0

Like

2 comments

It doesn't seem to be a memory issue. Bpm'online provides up to around 8 GB RAM in critical moments and 4 GB by default. Anyway, If the application consumes more than around 8 GB RAM, IIS restarts it automatically. If you need more resources, please contact your account manager and the limits will be increased. 

It seems like the issue is related to a wrong JSON format. However, since the JSON is huge you'll not be able to debug it. In this case I recommend to create your own web service according to the article by the link below. 

https://academy.bpmonline.com/documents/technic-sdk/7-13/how-create-cus…

This way in case of the exception message you'll be able to create your own logging or debug the service on a local copy of the application. 

Please be aware of the fact that during the integration process that consumes almost all available RAM users might face performance issues. 

Thank you very much for the reply; it was indeed an error of the JSON that was being called, since it contained Null fields that did not correspond.

Show all comments

Hello community



I am working with a business process using the process element [Call Web Service].

The web service configuration and the call are working correctly.

The JSON response is similar to:

{

"$ totalResults": 2,

"$ startIndex": 1,

"$ itemsPerPage": 100,

"$ resources": [

     {

      "$ clave": "t6UJ9A000001",

      "$ Static_state": 200,

      "$ etag": "Yi4EmiUg3xw =",

       "Account": {

             "$ clave": "A6UJ9A0001RU",

             "$ uuid": "00000000-0000-0000-0000-000000000000",

           }

      },

      {

      "$ clave": "t6UJ9A00000B",

      "$ Static_state": 200,

"$ etag": "wMpPUtrfgdA =",

"Account": {

"$ clave": "A6UJ9A0001RX",

"$ uuid": "00000000-0000-0000-0000-000000000000",

}

}

]

}



My goal is to iterate the JSON and finally create tickets in BPM with the source information.

Using a pre-configured page I was able to determine that the parameter where the information is returned is [#WS Step.Response body #]

How can I take this value in a Script Task and process the JSON? or what is the correct procedure to do this?

Previously I should be able to take the value of the parameter [#WS Setp.Success #] to determine if the execution was successful

Thank you!

Good weekend

Like 0

Like

1 comments

get/set a parameter value in a business process script task

var parameter1 = Get<Guid>("Parameter1");

Set("Parameter2", parameter1.ToString());

var parameter2 = Get<string>("Parameter2");

get object of type UserConnection

var userConnection = Get<UserConnection>("UserConnection");

Show all comments