@snikomarov36
Agreed what I was saying
snikomarov36 wrote:
Hi @Troy Vars.
The global DAC search mechanism requires declared Guid NoteID DAC field with PXNote attribute and PXSearchable attribute. If you add some information from INItemXRef to InventoryItem, even if the search would start displaying new search results, the user will still navigate to InventoryItem from them, not to INItemXRef.
Yep, the merge attributes didnt work so I tried a few other methods before using the override on InventoryItem I shared here. Given this was a Proof of Concept on a local dev environment. Not sure my concern was upgradability over functionality, but I get the mentioned for others stumbling on this article
If you take the approach with an extension to InventoryItem then there are few remarks:
This is the crux of the matter since the global type of XRef would be one to one but the Customer/Vendor would be one to many this will not work with the current Xref table.
Sad the documentation was not up to date could have saved some effort :(. Thank you for finding that btw.
- Now regarding your PXSearchable attribute declaration. Unfortunately, for DAC search things become complex when you try to use values from a different DAC in search results. It’s not yet described but it is in the plans of our documentation team.
- First of all, the DAC with the PXSearchable declaration should have some foreign key DAC field storing the reference to the related DAC and PXSelector on it. You can’t have one to many relationship here where you have one DAC with PXSearchable attribute and many related DACs. A foreign key to the particular DAC record is needed. I have a feeling that for INItemXRef this is the case. Am I correct? If yes, then in this case you can’t go InventoryItem route. I would suggest to try to experiment with adding NoteID field in DAC extension for INItemXRef. Don’t forget that for existing data some GUIDs should be generated and filled. You will also need to add the default navigation via PXPrimaryGraph to INItemXRef in the DAC extension. You can override default navigation that way:
https://help.acumatica.com/(W(195))/Help?ScreenId=ShowWiki&pageid=1dceb511-4e98-3700-7d7f-231688a7ac74 - If the relationship between DACs is not one to many then you need to find the selector field for it, and make sure it comes in the title fields array before fields of related DAC. In fact, you group it like this:
<one of field sets of the PXSearchable attribute>: [<fields from the declaring DAC>, typeof(selectorField1), <fields from related DAC 1>, typeof(selectorField2), <fields from related DAC 2>]
There is more detailed description in the attachement
I think the Options for my client are the following unless there is another suggestion:
- Use a GI which means navigating to another screen from Quotes and Projects like @slesin suggests
- Create a custom cross reference table with Navigation to replicate what Acumatica has done…
- Create custom Selectors with the Alternate ID and filter by the Global alternate type… on every screen it is missing
- Wait for this functionality to work with one to many or be added to global search
- Wait for one of the Add Item buttons to be added to these screens like it was for Field Service a few versions back. Hopefully we can see this added globally to some of these other screens that utilize inventory. (SO, PO and FS have it added just need CRM, AM, PJ and the like)