Question

How to add Order Product into Contract Details

Hello All,

I would like to add Product from order into Contract Sections Contract Detail tab, under Product Field group , So how can I do that Please provide the Solution

File attachments

Like

3 comments

It requires a lot of modifications in the code of the detail if you need to transfer the detail with all of the inner functionality. However, if you just need to see the products in the order page, you can create a new detail based on the "Product in order" object with the detail wizard. Then add the new detail into the Contract page with the section wizard. Then open the contract page schema, find the code of the detail and replace 

detailColumn: "Contract"

with

detailColumn: "Contract.Order"

and save the page. Then clean the cache of the browser and refresh the order page. The detail will show connected products but you will not be able to operate the data.

Hi Mark,

Thanx for reply but can u please elaburate the above point so that I can get it. I have try to do what u have written but not able to do that. Please do reply its very useful for me.

 

Dear Amol,

In order to add such detail to the contact page please do the following:

1. Go to the System Designer --> Detail Wizard --> Create a new detail based on the "Product in order" object.

Save the detail. Relogin into the system.

2. Go to the Contact page --> open Section wizard and add the detail you've just created. Set random Deatil column and Object column. It doesn't matter which you will indicate, because we are going to set the dependancy by code. Save the page in section wizard.

3. Go to the Configuration --> Open ContactPageV2. In the methods section add filtarion like in the example:


				orderFilter: function() {
					var filterGroup = new this.Terrasoft.createFilterGroup();
					filterGroup.logicalOperation = Terrasoft.LogicalOperatorType.AND;
					filterGroup.add(
						"ContactFilter",
						this.Terrasoft.createColumnFilterWithParameter(
							this.Terrasoft.ComparisonType.EQUAL,
							"Order.Contact", this.get("Id")
						)
					);
					return filterGroup;
				}

Afterwards, find your detail in the detail section of the ContactPageV2 and add the filtartionmethod like in the example:

				"Schema4Detail42a8629c": {
					"schemaName": "Schema4Detail",
					"entitySchemaName": "OrderProduct",
					"filter": {
						"detailColumn": "Id",
						"masterColumn": "Id"
					},
//here add the filter method
					"filterMethod": "orderFilter"
				}

 Save the ContactPageV2

4. In the configuration open the schema of the detail and add a block to the diff section:


		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "remove",
				"name": "AddRecordButton"
			}
		]/**SCHEMA_DIFF*/,

5. Empty browser cash and hard reload a page. In the newly added detail set up columns by clicking on three dots right next to the detail name.

Hope you will find this information helpfull.

Show all comments