I have read this article regarding adding multiple value to a detail.

Link - https://academy.creatio.com/documents/technic-sdk/7-15/adding-multiple-records-detail

 

 

But I do not understand these variable values. The opportunity and contact are the sections that are already created in the system. I want to know what values should I put in custom detail schema.

 

Details of Objects (every object is custom) -

  1. Client section with a detail of Partners
  2. Partners detail is made from Partner section

I want to change the Partner detail in Client to add multiple records. But I do not understand what should be the values of rootEntitySchemaName, rootColumnName, relatedEntitySchemaName, relatedColumnName.

 

Can anyone please help in this matter?

 

Thanks 

Ram

Like 0

Like

4 comments
Best reply

Hello Ramnath,

 

rootEntitySchemaName is the name of the parent object. This is likely the object for the page where the detail is located, so if the detail is on the Account page, this would be Account

 

rootColumnName is the name of the column on the detail object that relates it to the parent object. In the example of being on the Account page, this would be the name of the column on the detail object that is the account lookup, such as UsrAccount

 

relatedEntitySchemaName is the name of the object you're looking up to add to the detail. So, if the lookup is looking up contacts, this would be Contact

 

relatedColumnName is the name of the column on the detail object that the result from the lookup is stored in. So in the example of looking up contacts, this would be a contact lookup on the detail object, such as UsrContact.

 

Maybe this article will help? https://customerfx.com/article/adding-to-a-detail-from-a-lookup-in-crea…

 

Ryan

Hello Ramnath,

 

rootEntitySchemaName is the name of the parent object. This is likely the object for the page where the detail is located, so if the detail is on the Account page, this would be Account

 

rootColumnName is the name of the column on the detail object that relates it to the parent object. In the example of being on the Account page, this would be the name of the column on the detail object that is the account lookup, such as UsrAccount

 

relatedEntitySchemaName is the name of the object you're looking up to add to the detail. So, if the lookup is looking up contacts, this would be Contact

 

relatedColumnName is the name of the column on the detail object that the result from the lookup is stored in. So in the example of looking up contacts, this would be a contact lookup on the detail object, such as UsrContact.

 

Maybe this article will help? https://customerfx.com/article/adding-to-a-detail-from-a-lookup-in-crea…

 

Ryan

Ryan,

 

Thanks for helping me out.

 

Please guide me in this situation more.

Overview of whole scenario

I created a custom detail in a custom section.  I have created a Section Contacts (neither base object nor replacing object, It is custom made) and Clients Section. Clients section has a detail Contacts. The detail's object name is the Contacts section.

 

Section Page - UsrClients

Detail object - UsrContacts (has lookup of UsrClient for connecting record to UsrClients with other inherited columns present in UsrContacts)

 

Now the name will be

rootEntitySchemaName - UsrClients (section page object name)

rootColumnName - UsrClient  (the referencing lookup present in UsrContacts)

relatedEntitySchemaName - UsrContacts (Section page from where records will be read)

relatedColumnName - UsrContact (lookup present in detail)

 

Now the problem is how can I create a lookup pointing to the same object on which detail is build.

Lookup points to UsrContacts and detail is also created on UsrContacts.

 

RAMNATH SHARMA,

 

The detail should be a separate object. Like in the example on the academy, OpportunityContact object on which the detail is built on contains Opportunity and Contact columns. In your case, you would need to create a separate object for the detail that would contain UsrClients and UscrContacts columns, and build the detail on this object. 

Dennis Hudson,

 

Yes, you are right. I have created a new object with 2 looks fields to add this functionality. And it works.

Thanks

Show all comments

Hey

I am using calculated fields to convert inches to cm and vice versa on a lot of different measurements. I am just wondering if I am able to put a variable name when called the methodName so I wouldn't need to create a bunch of methods for each separate one.

Example

			"UsrLengthCM": {
				dataValueType: Terrasoft.DataValueType.FLOAT,
                dependencies: [
                    {
                        columns: ["UsrLengthInches"],
                        methodName: "calculateInchesToCM"
                    }
                ]
			},

do something like this is what I want

			"UsrLengthCM": {
				dataValueType: Terrasoft.DataValueType.FLOAT,
                dependencies: [
                    {
                        columns: ["UsrLengthInches"],
                        methodName: calculateInchesToCM("UsrLengthCM")
                    }
                ]
			},

to make it easier when using this.set

Like 0

Like

2 comments

The method will get passed two parameters, the second parameter is the field that triggered the event. You could use something like this:

calculateLength: function(sender, field) {
    switch(field) {
        case "UsrLengthCM":
            // ...
        case "UsrLengthInches":
            // ...
        // etc
    }
}

Not sure if that's something that will help, but thought I'd mention it.

Ryan

Ryan Farley,

Exactly what I need thank you!

Show all comments

I have an requirement to change city lookup whenever zip code is changed so is there any event that will do my work?

Thanks

Like 0

Like

2 comments

If you have a ZIP code field or similar in City to filter it by, you can set up a business rule similar to this, with your field in place of Description:

If you require more complex logic, go to the edit page in the backend and add a dependency to the attributes section:

attributes: {
    "City": {
	dependencies: [
	    {
		columns: ["Zip"],
		methodName: "doSomething"
	    }
	]
    }
}

And include your logic in the doSomething method, which will be called every time Zip is changed.

Dear Agha,

Please check the example provided by Darian. For the simple business task it is recommended to use business rules. 

In case you need more complex logic, including if clause, or evaluation on Id, or any other logic, which cannot be implemented by business rules, please use attributes.

In order to add an attribute you need to go to Advanced settings --> create a new replacing module for your page --> add an attribute and save the schema --> clear browser cache. 

Please see articles on schema attributes:

https://academy.bpmonline.com/documents/technic-sdk/7-13/attributes-attributes-property

Regards,

Anastasia

Show all comments

I want to add elements such as tables, radiobutton, dropdownlist to a page in bpmp process, but in the page designer I can not find them.

Should these be added with code?

What language is used?

Greetings.

Like 0

Like

4 comments

Edgar,

What does your page designer look like?

Jordan Kincer,

 

 

Jordan Kincer,

Try the first image using the wizard, but when you can not get elements such as a combobox, I started using the creation in Advance Settings

So for Radio Buttons, you can code them in, but I had issues getting more than three options on the page. If you are restricting the seleciton to one option, I might recommend using a lookup field.

As for the table/detail, I can see that your pre-configured page is missing a 'Tabs' section at the bottom which is the only place a detail can be added. 

When you first create a pre-configured page, it prompts you to select a template. If you want it to have Details inside it, one of the 'Tabbed Page' templates need to be selected.

Are you having issues putting a lookup/dropdown on your page as well?

Show all comments

Hi Community,

Any idea how can I open a section in client code?

Like 0

Like

2 comments

You'll use PushHistoryState to navigate to a section in client code. The following will go to the Contacts section: 

this.sandbox.publish("PushHistoryState", {hash: "SectionModuleV2/ContactSectionV2"});

The "hash" parameter is what appears after the ViewModule.aspx# in the url. 

Ryan

Dear Fulgen,

You can achieve such task in two ways. The first one is described by Ryan. This is an elegant and easy way to manipulate navigation.

Other approach is to use window.location.assign method https://webplatform.github.io/docs/apis/location/assign/ using relative or full path to the page. This approach will save browser history.

Regards,

Anastasia

Show all comments

Hi Community,

Any Idea how can i do this, lets say in Current Case Edit Page, I want to know in client code if my previous screen before opening the Case edit Page is whether Case Section or Account Edit Page (referring to case section detail inside account edit page).

Thanks 

 

Like 0

Like

1 comments

See currentState from HistoryState

var state = sandbox.publish("GetHistoryState");

            var currentHash = state.hash;

            var currentState = state.state || {};                                           console.dir(currentState)

Show all comments

Hi Community,

How can I open an Edit Page in client code?

Like 0

Like

4 comments

Something like this

this.openCardInChain({
    schemaName: "UsrMyPage",
    operation: ConfigurationEnums.CardStateV2.EDIT,
    id: theIdToEdit,
    moduleId: this.sandbox.id + "_UsrMyPage"
});

You'll also need to add ConfigurationEnums to the modules list. This means you'll add ConifurationEnums to the module/page you're using this code above from:

define("UsrMyCurrentPageV2", ["ConfigurationEnums"],
	function(ConfigurationEnums) {
 
    //....
 
}

Ryan

Thank you Ryan, this is what i am looking.

Fulgen Ninofranco,

Hi,

 id: theIdToEdit,Here which id we have to mention in the code.

praveen n,

Supply the Id of the record.

Show all comments