Solved

Selected Entity on Task screen seems to save the data, but not display on the screen

  • 1 August 2022
  • 1 reply
  • 166 views

Userlevel 6
Badge +3

I have a custom table which I have made available to lookup in the Related Entities field on the Task screen CR306020. 

I followed the tip at this post https://www.acumatica.com/blog/extending-the-related-entity-dropdown/ and was able to get my custom table to show up in the Type drop down list.  The lookup on the Entity opens the correct window and I am able to select my record.  Great!

 

Click the lookup on the field and select Opportunity For Improvement

Click the lookup on the Entity and select the record:

Then,

So far so good.  When I click OK, the field remains blank.

If I save the record and go back to it, then click the lookup on the Related Entities field, it looks like the values are stored with the record as they are pre-populated on in the popup window, they just aren’t displaying on the screen.

Also, if I click the Pencil icon, it opens my Opportunity for Improvement screen at the correct record.

I’m thinking that there is some logic in the presentation layer that is not able to display my custom table value.

Has anyone had any experience with this field?  It seems to be working, just not showing my values on the screen.

 

 

icon

Best answer by Cesar Betances 8 August 2022, 23:22

View original

1 reply

Userlevel 4
Badge +2

Hi,

You must decorate your field(s) with [PXFieldDescription] attribute in order for it to be displayed in the Related Entity Description field.  See sample below:

 

  [Serializable]
[PXCacheName("MyCustomTable")]
[PXPrimaryGraph(typeof(Test))]
public class MyCustomTable : IBqlTable
{
#region Id
[PXDBIdentity]
public virtual int? Id { get; set; }
public abstract class id : PX.Data.BQL.BqlInt.Field<id> { }
#endregion

#region Name
[PXDBString(50, IsKey = true, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Name")]
[PXSelector(typeof(Search<name>), DescriptionField = typeof(lastName), ValidateValue = false)]
[PXFieldDescription]
public virtual string Name { get; set; }
public abstract class name : PX.Data.BQL.BqlString.Field<name> { }
#endregion

#region LastName
.....................................
#region Noteid
[PXNote( ShowInReferenceSelector = true,
Selector = typeof(MyCustomTable.name),
DescriptionField = typeof(MyCustomTable.name))]
public virtual Guid? Noteid { get; set; }
public abstract class noteid : PX.Data.BQL.BqlGuid.Field<noteid> { }
#endregion

See in the UI:

Hope this helps.

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