Hello 

I have created a business process that reads in the creation and modification of a project id and project manager, 

I then wanted to change the permissions so that only the project manager could delete it, but during the execution of the process the values still remain on true 

What could be the reason for this?  I run the process as an administrator and the delete test is run on a user who does not have these permissions. The way it should work is that no one but the administrator should be able to delete projects. 

 

even though the process is executed, the value remains true 

    "Parametr": "List of rights to delete",
            "Wartość": {
                "Before execution": "[{Id:\"54e9e783-704b-4d77-b621-d8054d39f52a\",ParameterName:\"Role1\",Name:\"All employees.a29a3ba5-4b0d-de11-9a51-005056c00008\",CanRead:true,CanEdit:true,CanDelete:true,Source:\"3\",Grantee:\"Role\",Value:\"[#Lookup.84f44b9a-4bc3-4cbf-a1a8-cec02c1c029c.a29a3ba5-4b0d-de11-9a51-005056c00008#]\"}]",
                "After execution": "[{Id:\"54e9e783-704b-4d77-b621-d8054d39f52a\",ParameterName:\"Role1\",Name:\"All employees.a29a3ba5-4b0d-de11-9a51-005056c00008\",CanRead:true,CanEdit:true,CanDelete:true,Source:\"3\",Grantee:\"Role\",Value:\"[#Lookup.84f44b9a-4bc3-4cbf-a1a8-cec02c1c029c.a29a3ba5-4b0d-de11-9a51-005056c00008#]\"}]"
            }

            

           

Like 0

Like

3 comments

Are you sure the remaining access rights for All employees role is not "Deny"? I believe that process element won't technically remove the access rights, you'll still see it there but will be "deny" instead of allow.

Hello!  
 

I created a similar business process and successfully ran it. 

The process worked correctly, and I’m attaching screenshots as proof.  








You can also set the field "Which access rights to add?" to "All employees—Restrict", and the process should work as you expect.

In my example, I did exactly that, and I’m attaching the screenshots:





The reason why permissions are not changing as expected might be due to incorrect configuration of the "Change Access Rights" element in the business process. Please review the configuration of this element and ensure that the correct conditions and access rights are specified.  
 

If everything seems correct, please create a support request by contacting support@creatio.com

We will review the issue and assist with a solution.  

Regards,
Orkhan

I was able to successfully set the rights for the employees according to the instructions; interestingly enough, the rights edit page does not show that anything has changed. 

Show all comments

Hi all, 

I'm trying to calculate 60 days before a date captured by the user to create a reminder. I'm using the Formula in the Business Process but I cannot make it work, I see the following error: Formula value error: Cannot convert type "Int32" to "Entity"

 

Any suggestion?

Thank you

Like 0

Like

2 comments

It looks like it's an issue with trying to set the parameter you've selected to the value of the formula - what is the type of the parameter? It should be an integer based on the formula shown, which will be returning the day of the month 60 days before the Fecha de Lanzamiento date.

Hello,
 

We tried to check the behavior. It looks like the problem lies in expression because you are using .Day at the end.
We were able to successfully subtract -60 days simply by using the .AddDays(-60) method. [#read contact.First item of resulting collection.Birth date#].AddDays(-60)

AddDays(-60)

AddDays(-60)

 

Show all comments

When creating a filter using a date field of a related child object and using "maximum = Previous month", the results seem to be off by one day. For example, the current month is November and the filter pulls data with dates from Oct 2nd through Nov 1st.  

Has anyone noticed this behavior?   Is there a time zone related setting that would affect this or something?  

Like 0

Like

1 comments

Hi,

 

Please provide screenshots of the filters you have set up and the records that were affected by these filters, so we can try to reproduce the issue on our side.

Show all comments

How do we change the Autonumber's last generated number? So, we can continue from there.

Like 1

Like

2 comments

Hi Syed

 

Not an easy task in current version..., I suggest to review Ryan Farley article on https://customerfx.com/article/resetting-the-value-of-autonumber-fields-in-creatio/

 

Regards 

 

Julio

Julio Falcón (NoCode-Services),

Thanks a lot, it worked.

Show all comments

Hello everyone,

We’re currently using Creatio 8.XX as a SaaS solution. I’d now like to set up Creatio in my local environment for development purposes. Could anyone guide me on where I can download Creatio for local installation? I couldn’t find a download link for a zip file in the documentation.

Thanks!

Like 0

Like

1 comments

Contact support and they can provide the installation files.

Show all comments
Hello everyone,
I have set up and configured Identity Service in IIS and now I am trying to test it in postman (https://identityservice_url/connect/token).
 
I am getting the following exception in identity service log:
 
IdentityServer4.Hosting.IdentityServerMiddleware[0]
     Unhandled exception: The system cannot find the file specified.
     Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: The system cannot find the file specified.
        at System.Security.Cryptography.CngKey.Open(String keyName, CngProvider provider, CngKeyOpenOptions openOptions)
        at System.Security.Cryptography.CngKey.Open(String keyName, CngProvider provider)
        at Internal.Cryptography.Pal.CertificatePal.GetPrivateKey[T](Func`2 createCsp, Func`2 createCng)
        at Internal.Cryptography.Pal.CertificatePal.GetRSAPrivateKey()
        at Internal.Cryptography.Pal.CertificateExtensionsCommon.GetPrivateKey[T](X509Certificate2 certificate, Predicate`1 matchesConstraints)
        at System.Security.Cryptography.X509Certificates.RSACertificateExtensions.GetRSAPrivateKey(X509Certificate2 certificate)
        at Microsoft.IdentityModel.Tokens.X509SecurityKey.get_PrivateKey()
        at Microsoft.IdentityModel.Tokens.X509SecurityKey.get_PrivateKeyStatus()
        at Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider.FoundPrivateKey(SecurityKey key)
        at Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider..ctor(SecurityKey key, String algorithm, Boolean willCreateSignatures)
        at Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider..ctor(SecurityKey key, String algorithm, Boolean willCreateSignatures, CryptoProviderFactory cryptoProviderFactory)
        at Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateSignatureProvider(SecurityKey key, String algorithm, Boolean willCreateSignatures, Boolean cacheProvider)
        at Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateForSigning(SecurityKey key, String algorithm, Boolean cacheProvider)
        at Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateForSigning(SecurityKey key, String algorithm)
        at Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities.CreateEncodedSignature(String input, SigningCredentials signingCredentials)
        at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.CreateTokenPrivate(String payload, SigningCredentials signingCredentials, EncryptingCredentials encryptingCredentials, String compressionAlgorithm, IDictionary`2 additionalHeaderClaims, IDictionary`2 additionalInnerHeaderClaims, String tokenType)
        at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.CreateToken(String payload, SigningCredentials signingCredentials, IDictionary`2 additionalHeaderClaims)
        at IdentityServer4.Services.DefaultTokenCreationService.CreateJwtAsync(Token token, String payload, Dictionary`2 headerElements)
        at IdentityServer4.Services.DefaultTokenCreationService.CreateTokenAsync(Token token)
        at IdentityServer4.Services.DefaultTokenService.CreateSecurityTokenAsync(Token token)
        at IdentityServer4.ResponseHandling.TokenResponseGenerator.CreateAccessTokenAsync(ValidatedTokenRequest request)
        at IdentityServer4.ResponseHandling.TokenResponseGenerator.ProcessTokenRequestAsync(TokenRequestValidationResult validationResult)
        at IdentityServer4.ResponseHandling.TokenResponseGenerator.ProcessAsync(TokenRequestValidationResult request)
        at IdentityServer4.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context)
        at IdentityServer4.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context)
        at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
     An unhandled exception has occurred while executing the request.
     Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: The system cannot find the file specified.
        at System.Security.Cryptography.CngKey.Open(String keyName, CngProvider provider, CngKeyOpenOptions openOptions)
        at System.Security.Cryptography.CngKey.Open(String keyName, CngProvider provider)
        at Internal.Cryptography.Pal.CertificatePal.GetPrivateKey[T](Func`2 createCsp, Func`2 createCng)
        at Internal.Cryptography.Pal.CertificatePal.GetRSAPrivateKey()
        at Internal.Cryptography.Pal.CertificateExtensionsCommon.GetPrivateKey[T](X509Certificate2 certificate, Predicate`1 matchesConstraints)
        at System.Security.Cryptography.X509Certificates.RSACertificateExtensions.GetRSAPrivateKey(X509Certificate2 certificate)
        at Microsoft.IdentityModel.Tokens.X509SecurityKey.get_PrivateKey()
        at Microsoft.IdentityModel.Tokens.X509SecurityKey.get_PrivateKeyStatus()
        at Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider.FoundPrivateKey(SecurityKey key)
        at Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider..ctor(SecurityKey key, String algorithm, Boolean willCreateSignatures)
        at Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider..ctor(SecurityKey key, String algorithm, Boolean willCreateSignatures, CryptoProviderFactory cryptoProviderFactory)
        at 
 
Does someone knows why might this be happening?
 
I am attaching a screenshot of the appsettings.json file
Like 0

Like

2 comments

Screenshot of appsettings.json

Hello!

 

To test the identity service run it and try to test by http://[path-to-dentity]/.well-known/openid-configuration

 

This is mentioned here in the documentation. Regularly to fix this issue help next:

for the IdentityService application pool, the pool setting ProcessModel->Load User Profile = true must be specified.

Show all comments

Good day, colleagues.

 

When attempting to create a record in a related object using User-Task, I receive the error "Insufficient permissions to add record in object 'SomeObject'." Current permissions for this user in "SomeObject" are set to Read-only. However, when using the classes new EntitySchemaQuery(), new Entity(), and userConnection.EntitySchemaManager.GetInstanceByName("Entity_Name"), I set the UseAdminRights property to true.

 

I have used three different approaches:

 

1.
new SomeEntity(_userConnection)
{
   UseAdminRights = true
}

 

2.
new EntitySchemaQuery()
{
  UseAdminRights = true
}

 

3.
EntitySchema instanceByName = _uc.EntitySchemaManager.GetInstanceByName(typeof(EntityType).Name);
instanceByName.UseDenyRecordRights = true;

 

None of these have successfully created or retrieved the record. I request assistance in figuring out how to forcibly disable permission checks for any CRUD operations on the backend.

Like 0

Like

5 comments

Hi,

 

Example from the OmnichannelContactIdentifier (OmnichannelMessaging package):

 

var esq = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "ContactIdentity") {
                UseAdminRights = false
            };
            esq.PrimaryQueryColumn.IsAlwaysSelect = true;
            esq.AddColumn("Contact");
            esq.AddColumn("Channel");

...

Please try this approach of specifying the UseAdminRights flag for the server esq.

In addition to Oleg's response, you can also use the Select, Insert, Update, etc classes, they bypass security since they are executing direct in the database. See https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/8.1/direct-access-references

Also, you can get the SystemUserConnection to use for the ESQ.

Also worth noting for people who haven't used the Select, Insert, Update etc classes, they bypass all Creatio application logic, so things like Business Process triggers on record creation or update too. They are very useful, but need to be aware of that to avoid issues.

One more detail, if it isn't clear by now: the UseAdminRights flag doesn't mean "use the permissions of the administrator"...actually, the opposite is the case. It means "enable the usage of permissions".
I find the wording pretty misleading, but that's how it is ;)

Yes, naming leads to opposite meaning

Thx a lot for answers

Show all comments

Hi, I have developed a package in a Creatio environment, now I want to lock this package, so other developers will not be able to modify it? How can I do this? 

I would be grateful for any additional information on how locking of packages works and how it affects other packets that might have dependencies on such a packet, because the information I have been able to find in the creatio academy is limited.

Like 1

Like

10 comments

Hello!
 

Thank you for your question.
You can lock the package for Hotfix. By default, the package opens for hotfix only for 30 minutes, but you can change this value in the "Duration of package hotfix status" system setting.

More details about Package Hotfixes can be found in the following article on Creatio Academy

Hanna Shevchenko,

Thank you for your answer, but in my case, the package is open. I have created it,  now i want to lock it, (example: )

You can execute the following SQL statement to lock the package:

update "SysPackage" set "InstallType" = 1 where "Name" = 'MyPackageName'

Ryan

Thank you for your answer Ryan Farley,

I have tried this, but when I compile the workspace it shows me a list of errors, example: Type 'Team' already defines a member called 'GetData' with the same parameter types. 

Note that before the update of the field "InstallType", there are no compilation errors 

Alba M,

Hmm. There's got to be something else going on. Locking the package doesn't change it's contents in any way - I do this often.

Alba M,

Hi Alba, 

 

Try to Protect a package 

UPDATE "SysPackage"
SET "Maintainer" = 'Customer', "IsChanged" = FALSE, "IsLocked" = FALSE, "InstallType" = 1
WHERE "Name" = 'MyPackageName';

 

To unprotect it

UPDATE "SysPackage" 
SET "Maintainer" = 'Customer', "IsChanged" = TRUE, "IsLocked" = TRUE, "InstallType" = 0 
WHERE "Name" = 'MyPackageName';

Hi Julio.Falcon_Nodos, thank you for your answer

I tried this but it still gives the previous errors.

 

Hi Alba

 

Did you generate all code before compilation? If not, please try

Hi Julio Falcón (NoCode-Services),

Thank you for your answer,

I tried to firstly generated all the code(ACTIONS-> Generate for all schemas), but it still shows me the same errors after compilation

Thank you all for your answers, I fixed it by exporting the package, deleted it in the File System and then installed it in Application Hub. After installing I executed the query: update "SysPackage" set "InstallType" = 1 where "Name" = 'MyPackageName', for the package. The environment was compiled successfully.

Show all comments

Is it possible to override an OOTB C#-defined REST endpoint in Creatio? In our case, we need to trigger some action when a file is uploaded, and since the file record creation doesn't trigger business processes/similar, we need to do this some other way. One option we are trying to attempt is overriding the FileApiService's UploadFile method to trigger the behaviour after calling the base class to behave as normal for the file upload, but we can't seem to get any override behaviour of the WCF method to work. Does anybody have information or an example of how this might be done, or some other option that we could pursue?

Like 0

Like

1 comments

Hello Harvey,

Overriding the base REST service seems to be impossible in our system. We attempted to do this but were unsuccessful. I suggest creating a business process that starts after a specified delay (for example, one hour) to perform the required actions after the file upload. 

Show all comments

Hi Creatio Community,

 

I am developing a client side filter for a lookup in a section page (Freedom UI). I want to reload (re-filter) the lookup when the stage of the current record is updated (when GlbReloadEntityPage message is received).

Base logic for lookup loading:

{
	request: "crt.LoadDataRequest",
	handler: async (request, next) => {
		if(request.dataSourceName == "PDS_LookupCol") {
 
			request = await ModFunctions.filterAssignTo(request);
		}
		return await next?.handle(request);
	}
}

Reload function (Re-triggered ModFunctions.filterAssignTo(request);)

{
	request: "crt.HandleViewModelInitRequest",
	handler: async (request, next) => {
 
		request.$context.ServerMessageReceivedFunc = async function(event, message) {
			if (message.Header.Sender === "GlbReloadEntityPage") {
				await OPGlbReloadEntity.refreshScreen(request, message);
				ModFunctions.filterAssignTo(request);
			}
		};
		Terrasoft.ServerChannel.on(Terrasoft.EventName.ON_MESSAGE, (await request.$context.ServerMessageReceivedFunc), request.$context);
		return next?.handle(request);
	}
},

Filtering function 

		filterAssignTo: async function(request){
		    .... Custom logic .......
			const newFilter = Object.assign({}, filter);				
			newFilter.items = filter.items;
 
			if(request.parameters){
				request.parameters.push({
					type: "filter",
					value: newFilter
				});
			}
			return request;
		},

Even if the function is triggered when "GlbReloadEntityPage" is called the lookup is not reloaded with the new filtering rules. 

How can i reload lookup options from freedom ui client side?

 

 

Like 0

Like

2 comments

Any updates about this topic?

Hello,
Try to reload the data using the following code:

const handlerChain = sdk.HandlerChainService.instance;
await handlerChain.process({
      type: 'crt.LoadDataRequest',
      $context: request.$context,
      config: {
             loadType: 'reload'
      },
      dataSourceName: '{YOUR LOOKUP DATA SOURCE}'
});

Show all comments