back to top

Restricting the Related Assets SData Lookup for Tickets in the Infor CRM (Saleslogix) Web Client

When associating a related asset to a ticket in the Infor CRM Web Client (Saleslogix), the out of the box behavior will show all assets in the system in the lookup to select an asset. This doesn’t make a whole lot of sense for most people since they usually want to relate an asset that the account the ticket is for actually has, not just any asset in the system. Let’s take a look at how to customize this lookup to only show assets for the ticket’s account.

This lookup isn’t a standard lookup. The related assets grid is an editable SData grid, and the lookup is an SData lookup. When we’re taking about restricting the results of this lookup, we’re really talking about adding a where param to the SData call that populates the results of the lookup.

In Application Architect, 1) Select the grid on the TicketAssets form, 2) in the property editor, open “Tools” and select “Relate” 3) expand “Lookup Properties” 4) locate the property for “ConditionalWhere”

Ticket Assets - Lookup - ConditionalWhere

Open the editor for the ConditionalWhere. This editor is expecting some Javascript. We need to return a valid “where” param that will be included in the SData request, so it will need to be formed as something that SData understands. What we want in this case is to say “where the account product is for the current account”. Obviously, we need the ticket’s account ID value. If we needed the ticket’s ID, we could simply use:

var ticketId = Sage.Utility.getCurrentEntityId();

However, that won’t really help us here. We need the ticket’s account ID. To get the ticket’s account ID, we can just use dojo.byId to find the Account lookup on the ticket details, and then read the ID value from that. Our code will look like this:

function() {
	var accountLookup = dojo.byId('MainContent_TicketDetails_lueAccount_LookupResult');
	if (!accountLookup) return '';
	
	var accountId = accountLookup.value;
	if (!accountId) return '';
	
	return "Account.Id eq '" + accountId + "'";
}

Paste the code above into the editor, then build & deploy. The lookup to relate an asset will now only show assets for the ticket’s account. Note: this code assumes that you’ve not renamed the Account lookup on the TicketDetails form (out of the box it is named “lueAccount”).

Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Ryan Farley
Ryan Farleyhttps://customerfx.com/article/author/ryanfarley/
Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Infor CRM SLX 10.0: Delegate Ownership Changes for “Everyone” Records

Learn how the new EveryoneOwnerAssignment secured action in Infor CRM SLX 10.0 allows designated users to change ownership of Everyone-owned records without requiring Administrator access.

Related Articles

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Related Videos