Solved

How to enable search via description

  • 11 January 2024
  • 7 replies
  • 97 views

Userlevel 4
Badge

Hello all,

How can I enable searching a Labor item not only by Labor Item ID but also with Description using Project Editor? Currently i am only able to search via Labor Item ID.

 

Thanks in advance.

icon

Best answer by Naveen Boga 14 February 2024, 12:31

View original

7 replies

Userlevel 4
Badge

This is the current code being used:
 

 

Userlevel 5
Badge +1

Hi @Harry ,

You can add fields to FastFilterFields to allow search in selector.

Kindly find below screenshot for the same.

Hope, it helps,

Regards,

Sagar, Greytrix

Userlevel 4
Badge

Hey @sagar07 , thank you for your suggestion. I tried the above steps, but still it doesn’t work.

 

 

Userlevel 7
Badge +17

@Harry Acumatica is using below PXLoborItem Attribute for the LabourItemID field to load the Items.

As you wanted to search with the description, it may not be possible from the Project Editor and it requires customization to do this.

[PMLaborItem(typeof(projectID), typeof(earningTypeID), typeof(Select<EPEmployee, Where<EPEmployee.bAccountID, Equal<Current<EPTimeCard.employeeID>>>>))]

 

Userlevel 4
Badge

Hello @Naveen Boga ,

Would it be possible for you to share the particular code? Would really be grateful.

Thanks in advance.

Userlevel 7
Badge +17

@Harry  Below is the simple code that you need to add to get the required functionality.

Also attached sample customization package, you can deploy in your instance and verify.

 

using PX.Data;
using PX.Objects.IN;

namespace PX.Objects.EP
{
public class TimeCardMaint_Extension : PXGraphExtension<PX.Objects.EP.TimeCardMaint>
{
#region Event Handlers

[PXMergeAttributes(Method = MergeMethod.Merge)]
[PXDimensionSelectorAttribute("INVENTORY", typeof(Search<InventoryItem.inventoryID, Where<InventoryItem.itemType, Equal<INItemTypes.laborItem>,
And<Match<Current<AccessInfo.userName>>>>>), typeof(InventoryItem.inventoryCD), DescriptionField =typeof(InventoryItem.descr))]
protected virtual void EPTimeCardSummaryWithInfo_LabourItemID_CacheAttached(PXCache cache)
{
}
#endregion
}
}

 

Userlevel 4
Badge

Hey @Naveen Boga , thank a lot for your help. Just to know whether you added the code by using graph extension or DAC Extension?

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved