required fields
client_module
Sales_Creatio
8.0

Hi all,



When this page opens, a process runs automatically, and the 'Mandatory Values' field is filled. The 'Mandatory Values' field specifies which fields should be compulsory to fill. Accordingly, based on the values in the 'Mandatory Values' field, I need to make related fields mandatory (required).

For example, if the 'Mandatory Values' field value is 'Package Name, Price,' I need to make the 'Package Name' and 'Price' fields required.

Can I run a function on the client side to make fields compulsory after the automatic process has run?

Like 2

Like

1 comments
Show all comments
required fields
required
oData
Studio_Creatio_enterprise_edition

We are developing an external application to Creatio with integration via oData.

We need to know how to obtain with odata the required fields of a schema, for example contact and the data type of each field.

 

Thank you!

Regards

Like 0

Like

3 comments
Best reply

Hello Uriel,

Once authenticated normally, you can do a POST to the following (it's DataService, but when you authenticate for OData it will also work for DataService, even if you're using OData for the other requests):

/0/DataService/json/SyncReply/RuntimeEntitySchemaRequest

Include the following payload in the request:

{"uId":"25d7c1ab-1de0-4501-b402-02e0e5a72d6e"}

Where the uId included is the UId for the entity (you can get this from SysSchema or VwSysSchemaInWorkspace where ExtendParent = false). You'll get back a json payload with details for all columns, including the "isRequired" value for the column.

Ryan

Hello Uriel,

Once authenticated normally, you can do a POST to the following (it's DataService, but when you authenticate for OData it will also work for DataService, even if you're using OData for the other requests):

/0/DataService/json/SyncReply/RuntimeEntitySchemaRequest

Include the following payload in the request:

{"uId":"25d7c1ab-1de0-4501-b402-02e0e5a72d6e"}

Where the uId included is the UId for the entity (you can get this from SysSchema or VwSysSchemaInWorkspace where ExtendParent = false). You'll get back a json payload with details for all columns, including the "isRequired" value for the column.

Ryan

Ryan Farley,

Thank you! Have a nice weekend.

Ryan Farley,

Hello,

I need to update, using odata, a record in Creatio, but there are one or more fields that are required to be completed, on the Creatio side (Form_Page) that are not completed and I get error when updating those records using odata.


Is there any way to skip the required field rules (fields not related to the integration) and get the object update using odata?

Show all comments
section
section wizard
section fields
required fields
string text field
7.15
Sales_Creatio_enterprise_edition

I have created 3 new sections using section wizard and changed name of the UsrName field in all of them because I wanted different names.

But now whenever I publish any new object or compile items, I get this error. Is there any way to sort it out.

I am using demo environment.

Thank you

Like 0

Like

6 comments

Creatio does not like it when the UsrName is changed. You will need to change it back. You can change the title, but you cannot change the Name. You can, however, not use it. If you create a new String, you can change the Displayed Value in the Advanced Settings for the object to the new String you made. This changes the blue links to the new string instead of the UsrName.

 

Reid Burger,

 

Thanks for clarification.

I also would like to know if I can change the Required - At application level to No for UsrName.

RAMNATH SHARMA,

 

It is fine to change properties like required at application level to no. If the field is being used as the display value (like the name field) then having it blank would mean nothing would show in a lookup (if its used as a lookup somewhere). 

 

BTW it's usually a good idea to not rename column or object names and only change the titles once they're created. 

 

Ryan

Ryan Farley,

I changed back the names to UsrName using section wizard (which I later realized shouldn't have changed them back). Then I compiled the current workspace from Advanced settings to see if still any error occurs. 

Here are some screenshots

Now The errors are because I changed back the name to UsrName, it says that the old Name - UsrClaimant don't exist.

I also opened the source code where these errors were pointing to - 

 

 

But I can not edit the source code in Cloud demo instance.

Is there any way to change the source code or any process to correct these source codes?

 

Ramnath

Hi Ramnath,



As Reid mentioned, we do not recommend to change the name after the section being created.



If such an issue appears you can simply generate source code for all objects that are mentioned in compilation errors and compile modified items. If all necessary items were not removed this should fix the issue



Thank you.

Bohdan Zdor,

Thanks. I will definitely try this out.

Show all comments

In short, is this possible? For example, I want to require entry of a Contact Type on a new contact entry page, but I want to do it in the UI, not by making the underlying data column a NOT NULL column.

Like 0

Like

2 comments

Dear Jeffrey, 

You can do this with the field validation on the page. Here is the academy article on how to do that: 

https://academy.bpmonline.com/documents/technic-sdk/7-13/how-add-field-validation

Best regards,

Dennis

 

Thanks Dennis!

Show all comments
mobile
required fields
business rule
7.13_()
studio

Hi Community,

In mobile application Conditional columns is not working in rule type requirement. Below is my code.

Terrasoft.sdk.Model.addBusinessRule("Case", {

    ruleType: Terrasoft.RuleTypes.Requirement,

    requireType : Terrasoft.RequirementTypes.Simple,

    events: [Terrasoft.BusinessRuleEvents.Save],

    triggeredByColumns: ["UsrIsClosed"],

    conditionalColumns: [

        {name: "UsrIsClosed", value: true}

    ],

    dependentColumnNames: ["UsrComments"]

});

I want column UsrComments to be required if column UsrIsClosed is true. The code above is not working, please suggest

 

Like 0

Like

7 comments

Eugene Podkovka,

Hi Eugene, Thanks for your reply

Module appears on the client end, manifest is also correct.

Using below code without conditionalColumns rule is working fine:

Terrasoft.sdk.Model.addBusinessRule("Case", {

    ruleType: Terrasoft.RuleTypes.Requirement,

    requireType : Terrasoft.RequirementTypes.Simple,

    events: [Terrasoft.BusinessRuleEvents.Save],

    triggeredByColumns: ["UsrComments"],

    columnNames: ["UsrComments"]

});

But the above code will not serve our purpose, we only require "UsrComments" to be mandatory if "UsrIsClosed" field is true.

That's why I created below code:

Terrasoft.sdk.Model.addBusinessRule("Case", {

    ruleType: Terrasoft.RuleTypes.Requirement,

    requireType : Terrasoft.RequirementTypes.Simple,

    events: [Terrasoft.BusinessRuleEvents.Save],

    triggeredByColumns: ["UsrIsClosed"],

    conditionalColumns: [

        {name: "UsrIsClosed", value: true}

    ],

    dependentColumnNames: ["UsrComments"]

});

Please suggest, how I can use "conditionalColumns" attribute for rule type requirement.

Fulgen Ninofranco,

The code seems like correct. Try to restart the application pool and synchronize the mobile application again. 

http://prntscr.com/oyo0vz

Eugene Podkovka,

Thanks Eugene.

We already did the restart and synchronize but still not working. I also noticed one thing in the documentation. "conditionalColumns" is not discussed here as part of the attributes of rule type requirements but from other rule type it is included. Please suggest how we can achieve our condition if "conditionalColumns" will not work.  

https://academy.bpmonline.com/documents/technic-sdkmob/7-12/business-rules-mobile-application

Eugene Podkovka,

Hi Eugene, any update on this. Thank you

Fulgen Ninofranco,

Try to debug the mobile application, find how business rules work and find how to adjust them according to your needs.

https://academy.bpmonline.com/documents/technic-sdkmob/7-12/mobile-application-debugging

Start from the executeApplicableRules method in the BusinessRulesManager module.

Hi, did you find a resolution to your issue? I am facing the same thing.

Show all comments