Skip to main content

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.

 

 

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