we need to customize the modal box shown when we need to select for example Account lookup, by adding fixed filters on the top then the search button gets Accounts based on this filter.

Also can we hide the New Button here ?

will this customization affect other lookup selection modal box? 

if this is not applicable is there any other approach ? 

 

Like 0

Like

6 comments

Dear Ayman,

You can add a fixed filter to the lookup page, however, this requires development skills. Please see this article with instructions: 

https://academy.bpmonline.com/documents/technic-sdk/7-13/adding-quick-filter-block-section

The schema you would need to modify is LookupPageViewGenerator. Please note, that applied changes would be displayed for all sections and each place where you use lookup page.

In order to remove New button, you need to override the getSelectionControlsConfig and getEditionControlsConfig methods on LookupPageViewGenerator schema and remove add button from there.

As an alternative approach, you can apply business rule on the field and in this case lookup would be automatically filtered. 

Regards,

Anastasia

Hi Anastasia,

I can't create "replacing client module" with parent is LookupPageViewGenerator. How can I "modify" it as you said? I found lookup Brand and Category in ProductPageV2 which hide button "New" when open its lookup modal. How can I see their source code?

Thanks

Anastasia Botezat,

Please help

Toan Mai,

Hello!



If you want to hide 'NEW' button you can simply add  "hideActions": true to your lookuplistconfig property of the attribute correspondent to lookup field.



Please see snippet below:

define("OrderPageV2", [], function() {
	return {
		entitySchemaName: "Order",
		attributes: {
			"Opportunity": {
				"lookupListConfig": {
					"hideActions": true
				}
			}
		},
		modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		businessRules: /**SCHEMA_BUSINESS_RULES*/{}/**SCHEMA_BUSINESS_RULES*/,
		methods: {},
		dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/,
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
	};
});



It will however also hide actions drop down, but this drop down is also connected to crud operations within lookup field.



See result here:

https://prnt.sc/px04je

 

 

Dmytro Smishchenko,

This solution seems to work on lookup object in Order section. How can we implement the same on the Detail ?

hi ayman ,  can you send me code for this model box

Show all comments

I have problems with this Custom Lookup. I want to manage it through the pop-out window.

I have chenged the Access rights to match what I want. But the so called default page is not reacting to this at all. Do I need a custom page for New, Edit and Copy actions of the Lookup values?

How do I create a custom Lookup page? And do the New, Edit, Copy buttons require a custom lookup page?

I am having problems finding out how to do it. Even though I have done this before, I have forgotten.

I can't even find what I need in the academy. What I can't find does not seem to be enough https://academy.bpmonline.com/documents/administration/7-13/lookup-prop…

Lookup properties:

 

Like 0

Like

1 comments

Dear Julius,

The actions Edit, Copy, Delete are avaliable for those lookups, which are based on object with edit page. Therefore, in order to have such actions you need to create an edit page for your object.

In order to do so you need:

1. Create a new Schema of the Edit page View model

2. Indicate entitySchemaName property to the object of the lookup and create an edit page, you can take any other edit page as an example

3. Register your edit page in the SysModuleEdit table, where you indicate object - page relationship.

After this you will have the actions for the lookup. Another option to do so is to register a section for your custom object on which lookup is based. In this case edit page will be created automatically in the course of creating a section.

Regards,

Anastasia

Show all comments

Hi Community!

How are you?

I hope you can help me!

When I mouse over the name of a custom entity,

I want it to open a popup similar to the one opened when I mouse over the name of a contact.

 

I want to show information of several fields in that popup

How could I do it?

King Regards,

 

Ezequiel

 

 

Like 0

Like

2 comments

Dear Ezequiel,

This functionality is implemented via mini cards. Please follow this link tot check what it is used for: https://academy.bpmonline.com/documents/technic-sdk/7-12/mini-page

If you want to add it to your custom section, please check the articles in our development guide: https://academy.bpmonline.com/documents/technic-sdk/7-12/how-create-mini-page

Best regards,

Lily

Dear Lily!

Thanks for you response!

It was very helpful

Regards,

Ezequiel!

Show all comments
Question

Hello dears, 

I need show a popup to get a value when the action start. 

Can help me with that?

Regards, 

Like 0

Like

2 comments

Yeah, I would like to know that too!

If you're asking about calling a popup from a business process, then there is no such a functionality in the out-of-the-box system.

It's possible to create such a functionality with code. This is the way on how to call a page method from a business process.

The code in the process

 

//Usings
 
using Terrasoft.Configuration;
using Terrasoft.Messaging.Common;
using Newtonsoft.Json;
 
//Code
 
public void SendMessage() {
    string senderName = "TestPopup";
    string message = JsonConvert.SerializeObject(new {
        RecordId = Guid.NewGuid(),
        Name = "Some name"
    });
     
    // For all users
    //MsgChannelUtilities.PostMessageToAll(senderName, message);
     
    // For current user
    var userConnection = Get<UserConnection>("UserConnection");
    MsgChannelUtilities.PostMessage(userConnection, senderName, message);
     
    // For specific user with sysAdminUnitId
    /*IMsgChannel channel = MsgChannelManager.Instance.FindItemByUId(sysAdminUnitId);
    if (channel != null) {
        var simpleMessage = new SimpleMessage() {
            Id = sysAdminUnitId,
            Body = message,
            Header = {
                Sender = senderName
            }
        };
        channel.PostMessage(simpleMessage);
    }*/
}

Frontend

define("CommunicationPanel", ["terrasoft", "LookupUtilities"],
	function(Terrasoft, LookupUtilities) {
		return {
			messages: {
				"CardProccessModuleInfo": { "direction": "subscribe", "mode": "ptp" },
				"GetHistoryState": { "direction": "publish", "mode": "ptp" }
			},
			attributes: {},
			methods: {
				init: function() {
					this.callParent(arguments);
					Terrasoft.ServerChannel.on(Terrasoft.EventName.ON_MESSAGE, this.onMessageReceived, this);
				},
				//probably onMessage
				onMessageReceived: function(sender, message) {
					if (message && message.Header && message.Header.Sender === "TestPopup") {
						//var result = this.Ext.decode(message.Body);
 
						var contactFilters = Terrasoft.createFilterGroup();
						var config = {
							entitySchemaName: "Contact",
							mode: "processMode",
							captionLookup: "Contact lookup",
							multiSelect: false,
							columnName: "Name",
							filters: contactFilters,
							commandLineEnabled: true
						};
						var handler = this.handler;
						LookupUtilities.OpenLookupPage(this.sandbox, {config: config, handler: handler}, this, null, false);
					}
				},
				handler: function() {
					//run process here
					/*
					ProcessModuleUtilities.executeProcess({
						sysProcessName: processName
					});*/
				},
				destroy: function() {
					this.Terrasoft.ServerChannel.un(Terrasoft.EventName.ON_MESSAGE, this.onMessage, this);
					this.callParent(arguments);
				}
			},
			diff: []
		};
	});

Please note that you'll need to modify the OpenLookupPage method and draw a lookup frame manually.

Show all comments