Hi,

I created a new operation permission named "CanRunXXX"

When a user runs a specific process, I need to check if the user has the permission  to use it.

In the market place exists an addon specific for this feature https://marketplace.creatio.com/template/check-permission-operation

If I wanted to build it from scratch how can I do it?

Like 0

Like

7 comments

Hi Stefano,

 

Please install this marketplace app and analyze the content of the custom user task. It should contain some script inside it that receives the collection of allowed users that are stored in the operation permission users list. And this script can be used as an analogue to create your own user task if needed.

 

Best regards,

Oscar 

Oscar Dylan,

Thank you

Stefano Bassoli,

Hi

I tried to install the addon but it doesn't work

Any other suggestions ?

Stefano Bassoli,

I've installed the marketplace app and the following process worked perfectly on my end:

Basically the logic that checks if the current user has operation permissions rights is stored in the labCheckUserOperPermission class of the UserTask of the marketplace app:

protected override bool InternalExecute(ProcessExecutingContext context) {
			Success = (bool)UserConnection.DBSecurityEngine.GetCanExecuteOperation(OperationPermissionCode, UserConnection.CurrentUser.Id);
			return true;
		}

And returns either "true" or "false" for the "Success" parameter and the parameter itself determines if the process should be executed further or not. The full code of the UserTask can be found below:

namespace Terrasoft.Core.Process.Configuration
{
 
	using Newtonsoft.Json;
	using Newtonsoft.Json.Linq;
	using System;
	using System.Collections.Generic;
	using System.Collections.ObjectModel;
	using System.Globalization;
	using Terrasoft.Common;
	using Terrasoft.Core;
	using Terrasoft.Core.Configuration;
	using Terrasoft.Core.DB;
	using Terrasoft.Core.Entities;
	using Terrasoft.Core.Process;
	using Terrasoft.UI.WebControls.Controls;
 
	#region Class: labCheckUserOperPermission
 
	/// <exclude/>
	public partial class labCheckUserOperPermission
	{
 
		#region Methods: Protected
 
		protected override bool InternalExecute(ProcessExecutingContext context) {
			Success = (bool)UserConnection.DBSecurityEngine.GetCanExecuteOperation(OperationPermissionCode, UserConnection.CurrentUser.Id);
			return true;
		}
 
		#endregion
 
		#region Methods: Public
 
		public override bool CompleteExecuting(params object[] parameters) {
			return base.CompleteExecuting(parameters);
		}
 
		public override void CancelExecuting(params object[] parameters) {
			base.CancelExecuting(parameters);
		}
 
		public override string GetExecutionData() {
			return string.Empty;
		}
 
		public override ProcessElementNotification GetNotificationData() {
			return base.GetNotificationData();
		}
 
		#endregion
 
	}
 
	#endregion
 
}

So you can use something similar on your end as well.

 

Best regards,

Oscar

Hi Oscar 

In my environment doesnt appare in the user task list the new action 

Stefano Bassoli,

 

then you need to either re-install the marketplace app or check that your app is greater than 7.12 version and uses .NET Framework or use the code above to create your own user task to check operation permissions.

 

Best regards,

Oscar

Thank you very much

 

Show all comments

Hi,

I need to convert a detail to a section because my customer need to export on excel all details created.

Which is the best way to do this?

 

Like 0

Like

2 comments

Hello Stefano,

 

Hope you're doing well.

 

To perform your business task please refer to this community question regarding registering a custom section for an existing object: 

https://community.bpmonline.com/articles/register-custom-section-existi….

 

In your case, the needed detail is an object and you need to create a section from it. After that, the required data should be available in the newly added section.

 

Best regards,

Roman

Roman Rak,

Hi Roman,

thank you for your support.

I used the feature available in section wizard and some query derived from the post you suggest me, to get my goal.

Show all comments

Hi Community,

 

Any idea or have you tried it before to integrate Cisco PBX specifically model model CP-7811 / CP-8851? How the setup/configuration goes?

 

Thanks

Like 0

Like

1 comments

Hello Fulgen,

 

Thank you for your question but Creatio application integrates only with the telephone server and not with the hardphones directly.

The models that you specified can be connected to the Cisco or any other telephone server and the server will be then connected to your Creatio instance.

 

Best regards,

Bogdan S.

Show all comments

Hi Community,

 

Currently in activity, you can add participant individually. What our client wants instead of individual participant, user can add a group/groups. Any suggestion  for the best approach to do this please.

Like 0

Like

3 comments

Hello Fulgen,

 

Do you see that as adding an Organizational / Functional role or like adding more than one user at once into the Activity participant list?

Thank you for the clarification!

 

Best regards,

Bogdan S.

Bogdan Spasibov,

 

Hi Bogdan, Thank you so much. Its like adding Organizational / Functional role. Once group is added all contacts under this group will be added as activity participant.



What i am thinking is to create a custom section(Activity Group) where user can create group/s. Under custom section there is a detail where user can add contacts.



In activity, user can select an Activity Group. Then I will trigger a business process that will select all contacts from Activity Group and insert in in Activity Participant.



Is there any other best way aside from this? 

Fulgen Ninofranco,

 

Yes, actually the implementation that involves BP usage here is the best option.

Please let us know if you need any further assistance with this.

 

Thank you!

 

Best regards,

Bogdan S.

Show all comments

Hi Team,

 

I have a requirement to get data of details attached with a record into fast report designer to generate PDF.

we referred academy but data only from the section was fetched can some please help me to achieve this functionality any other workaround will appreciated.

https://academy.creatio.com/documents/technic-sdk/7-15/setting-reports-…

 

Above article that I used to achieve this funtionality

 

Thank you

Like 1

Like

3 comments

Hello,

 

I've attached the example of provider schema as a .md file as well as the raw text file with code and report template. In the example the report takes ContactAnniversary detail in Contacts. Here is the report setup:

 

http://ftp.creatio.com/support/downloads/SR-0937017/Files.rar

{
    "ProviderName": "ContactAnniversariesReportDataProvider",
    "Schemas": {
        "Contact": {
            "Id": {
                "DataValueType": 0
            },
            "Name": {
                "DataValueType": 1
            },
            "Phone": {
                "DataValueType": 1
            },
            "HomePhone": {
                "DataValueType": 1
            },
            "MobilePhone": {
                "DataValueType": 1
            },
            "OwnerName": {
                "DataValueType": 1
            }
        },
        "ContactAnniversary": {
            "ContactId": {
                "DataValueType": 10,
                "ReferenceSchemaName": "Contact",
                "ReferenceColumnName": "Id"
            },
            "TypeName": {
                "DataValueType": 1
            },
            "Date": {
                "DataValueType": 8
            }
        }
    }
}

 

Best regards,

Oscar

Hi Oscar, I cannot import the md file, I'm getting an error regarding the package: "Unable to save changes for item "Custom". It is either created by third-party publisher or installed from the file archive", how can I import it?

Julio.Falcon_Nodos,

Hello,

 

It's because starting from 7.16.1 this schema was added out-of-the-box and can be found in the "FastReport" package:

So that's why there is no need to add this schema to the system anymore.

 

Best regards,

Oscar

Show all comments

Hi

Is it possible to create nested detail ?

Can a detail contains another detail ?

Like 0

Like

4 comments

Yes, in Detail Wizard, you can create a Tab and then add a detail. 

Hello Stefano,

 

Could you please clarify your business task? What is the purpose of creating a detail that contains another detail?

 

Thank you beforehand!

Olga. 

Mohamed Ouederni,

Thank you Mohamed it works!

 

Olga Avis,

Olga Avis,

Hi Olga, a custom entity has more cases and each case contains more fees.

This is the business task

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

Hello Community!

 

I would like to know if there is posible to send a attachment like byte[] or blob throw the web service element for a business process.

 

Thanks,

 

Like 0

Like

2 comments

Hi Federico, 

 

There are no precise restrictions on byte[] or blob attachments; however, could you please specify your business task so we could understand how to implement it better?

 

Regards,

Anastasiia

Hi Anastassia. 

 

I need to send the "Data" field to a webservice post. I have the webservice added for use with the element, but can't find the correct parameter to send my file like byte[] from the business process.

 

This is my request in CURL

 

curl --location --request POST 'https://test/upload' \

--header 'Content-Type: multipart/form-data' \

--header 'Authorization: {{api-key}}' \

--form 'file=@test.pdf' \ //Need to be application type/pdf

--form 'summary='descripción del documento' \

 

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

I am unable to get the "replacing view model" option to work on 7.17 on the trial cloud with the most basic of custom cases. I am assuming that "replacing view model" on 7.17 replaces "replacing client module" on earlier versions. Please validate. Am I missing a step here? Any help here would be greatly appreciated.

 

Thanks in advance...

Like 0

Like

4 comments

Dear Amanthen,

 

You are correct. The titles are a bit changed in the new interface but it is the same as old "replacing client module".

 

Regards,

Dean

Dean Parrett,

Thanks for confirming Dean!

 

The problem is I am unable to get the replacing module logic to work on 7.17. The same logic seems to be working fine on 7.16. 

 

I have created a new trial instance and am creating a single replacing client module overriding the parent "communication panel schema" of "UiV2" package. Below is the custom code I have written, but it doesn't seem to work on 7.17. Am I missing a step here?

 

define("CommunicationPanel", [],
function() {
	return {
            methods: {
              init: function() {   
                window.console.log("Test");
                window.alert("Test");
                this.callParent(arguments);                
              }
            }
        };
    });

 

Hi Amanthena,

 

The latest update interface is available as the trial version for beta-testing only and may include some inaccuracy. Thank you for reporting! The issue is already fixed in the coming release. 

 

However, there is a workaround for replacing client module schema; please follow the previous configuration address to make the changes you need:

[your_website]/0/WorkspaceExplorerModule.aspx

 

Regards, 

Anastasiia

Anastasiia Markina,

Thank you Anastasiia!

Show all comments