Skip to main content

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.

This is the current code being used:
 

 


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


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

 

 


@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.

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

 


Hello @Naveen Boga ,

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

Thanks in advance.


@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
}
}

 


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