Solved

Display of new Combo Box value for a status field in Generic Inquiry

  • 7 March 2022
  • 4 replies
  • 577 views

Userlevel 2
Badge +1

Hello,

 

I have added a small customization to the Vendor Status field such that it includes a new available option for selection. This was done through the Customization Project via the ‘Fields’ section of the ‘Vendors’ [AP303000] screen, where a new Combo-box value of ‘Z’ and description of ‘Pending Approval’ (see below screenshot) were added.

 

 

The respective value of ‘Pending Approval’ is available on the ‘Vendors’ [AP303000] screen, however when running the Generic Inquiry which shows the list of Vendors, there is a slight issue, whereby the Status is being shown as blank. I have some workarounds to this such as by using a Switch function to manually show the status description, although this is not “clean” as it could break in case of upgrades and it would be considered as sort of “hard-coding”, thus is not good practice.

 

 

Does anyone know whether there is perhaps some missing configuration that I need to do to make the value description show for the new Combo-box values?

 

Thanks in advance,

Nigel Pace

icon

Best answer by Naveen Boga 7 March 2022, 16:55

View original

4 replies

Userlevel 4
Badge +1

hi @npace29 

Would  to check have you declared the schema field for your custom field. If yes please share your GI 

 

Userlevel 2
Badge +1

@deebhane Thanks for your reply.

 

The GI is the standard one provided by Acumatica for the Vendors screen. I have attached it for your perusal.

 

 

Thanks again,

Nigel Pace

Userlevel 7
Badge +17

Hi @npace29  I worked on a similar kind of issue for the different screen i.e Projects.

This is an Acumatica issue, where it is not showing the newly added status in the GI’s.

Here is the workaround to resolve the issue. 

  • Extend the Vendor DAC and add the Status field
  • Instead of using the default status list, you need to create a new list by adding the new status like below.

Please find the similar code below and verify.

 

 public class PMProjectExt : PXCacheExtension<PMProject>
{
#region Status
[PXDBString(1, IsFixed = true)]
[ProjectStatusExt.List()]
[PXDefault(ProjectStatusExt.Planned)]
[PXUIField(DisplayName = "Status", Required = true, Visibility = PXUIVisibility.SelectorVisible)]
public string Status { get; set; }
#endregion

}

public static class ProjectStatusExt
{
public class ListAttribute : PXStringListAttribute
{
public ListAttribute() : base(
new[]
{
Pair(Planned, PX.Objects.PM.Messages.InPlanning),
Pair(Active, PX.Objects.PM.Messages.Active),
Pair(Completed, PX.Objects.PM.Messages.Completed),
Pair(Cancelled, PX.Objects.PM.Messages.Canceled),
Pair(OnHold, PX.Objects.PM.Messages.Suspend),
Pair(PendingApproval, PX.Objects.PM.Messages.PendingApproval),
Pair(Contract.status.InUpgrade, PX.Objects.CT.Messages.InUpgrade),
Pair(Closed, "Closed"),
})
{ }
}

public class TemplStatusListAttribute : PXStringListAttribute
{
public TemplStatusListAttribute() : base(
new[]
{
Pair(Active, PX.Objects.PM.Messages.Active),
Pair(OnHold, PX.Objects.PM.Messages.OnHold),
})
{ }
}

public const string Planned = Contract.status.Draft;
public const string Active = Contract.status.Active;
public const string Completed = Contract.status.Completed;
public const string OnHold = Contract.status.Expired;
public const string Cancelled = Contract.status.Canceled;
public const string PendingApproval = Contract.status.InApproval;

public const string Closed = "X"; //Symbol assigned in Workflow

public class planned : PX.Data.BQL.BqlString.Constant<planned>
{
public planned() : base(Planned) {; }
}

public class active : PX.Data.BQL.BqlString.Constant<active>
{
public active() : base(Active) {; }
}

public class completed : PX.Data.BQL.BqlString.Constant<completed>
{
public completed() : base(Completed) {; }
}

public class cancelled : PX.Data.BQL.BqlString.Constant<cancelled>
{
public cancelled() : base(Cancelled) {; }
}

public class onHold : PX.Data.BQL.BqlString.Constant<onHold>
{
public onHold() : base(OnHold) {; }
}

public class pendingApproval : PX.Data.BQL.BqlString.Constant<pendingApproval>
{
public pendingApproval() : base(PendingApproval) {; }
}
}
}

 

In the above, I have added Closed status with X symbol, the same way you need to add your status i.e. Pending Approval i.e. Z, and verify  

Userlevel 2
Badge +1

@Naveen B Thanks a lot for your detailed response. Much appreciated :slight_smile:

 

I will definitely try it out :) 

 

Will keep you posted.

 

Nigel Pace

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