Question

How can i find code for "NEW LEAD" button ?

Hi,

I searched code for NEW LEAD button code but I could not find out.

That code can be useful for our requirement.

Please find the pictures below.

 

 

 

Regards,

Suresh G.

Like 0

Like

2 comments

Dear Suresh,

You need to inspect the code in the development console of the browser as it contains all the code used on the current page. 

In this case you need to use the 'AddRecordButton' code for example. You may find the necessary functionality coded in Section Base Schema:

				//				CombinedModeAddRecordButton
				{
					"operation": "insert",
					"name": "CombinedModeAddRecordButton",
					"parentName": "CombinedModeActionButtonsSectionContainer",
					"propertyName": "items",
					"values": {
						"itemType": Terrasoft.ViewItemType.BUTTON,
						"style": Terrasoft.controls.ButtonEnums.style.GREEN,
						"caption": {"bindTo": "AddRecordButtonCaption"},
						"click": {"bindTo": "addRecord"},
						"classes": {
							"textClass": ["actions-button-margin-right"],
							"wrapperClass": ["actions-button-margin-right"]
						},
						"enabled": {
							"bindTo": "ShowSaveButton",
							"bindConfig": {
								"converter": function(value) {
									return !value;
								}
							}
						},
						"controlConfig": {
							"menu": {
								"items": {
									"bindTo": "EditPages",
									"bindConfig": {
										"converter": function(editPages) {
											if (editPages.getCount() > 1) {
												return editPages;
											} else {
												return null;
											}
										}
									}
								}
							}
						}
					}
				//				SeparateModeAddRecordButton
				{
					"operation": "insert",
					"name": "SeparateModeAddRecordButton",
					"parentName": "SeparateModeActionButtonsLeftContainer",
					"propertyName": "items",
					"values": {
						"itemType": Terrasoft.ViewItemType.BUTTON,
						"style": Terrasoft.controls.ButtonEnums.style.GREEN,
						"caption": {"bindTo": "AddRecordButtonCaption"},
						"click": {"bindTo": "addRecord"},
						"visible": {"bindTo": "IsAddRecordButtonVisible"},
						"classes": {
							"textClass": ["actions-button-margin-right"],
							"wrapperClass": ["actions-button-margin-right"]
						},
						"controlConfig": {
							"menu": {
								"items": {
									"bindTo": "EditPages",
									"bindConfig": {
										"converter": function(editPages) {
											if (editPages.getCount() > 1) {
												return editPages;
											} else {
												return null;
											}
										}
									}
								}
							}
						}
					}

Feel free to check these two snippets and use them as an example for tyour custom development.

Lisa

Thanks a lot Lisa

Show all comments