Solved

Property set method not found when trying to change string field lengh and mask a field in PMAccess Screen

  • 31 December 2021
  • 1 reply
  • 110 views

Userlevel 7
Badge +8

Hello There,

 

I need to change a field mask to match with my Projects mask but i’m getting the below error. I tried customizing the base attributes through graph cachattached but I get the same error. Here is the error:

 Property set method not found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Property set method not found.

Source Error:


Line 959: {
Line 960: PXDataSource datasource = ((PXPage)this.Page).DefaultDataSource;
Line 961: if (datasource != null && PX.Data.Process.PXAuditHelper.IsInfoAvailable(datasource.DataGraph, datasource.PrimaryView))
Line 962: {
Line 963: PXCache cache = datasource.DataGraph.Views[datasource.PrimaryView].Cache;


Source File: C:\Acumatica\LarkGroup\Controls\PageTitle.ascx.cs Line: 961

Stack Trace:


[ArgumentException: Property set method not found.]
PX.Data.PXGraph.CreateInstance(Type graphType, String prefix) +1144
PX.Web.UI.PXBaseDataSource.CreateDataGraphAsSingleton(Type type) +560
PX.Web.UI.PXBaseDataSource.CreateDataGraph(Type type) +175
PX.Web.UI.PXBaseDataSource.get_DataGraph() +412
User_PageTitle.InitAuditMenu() in C:\Acumatica\LarkGroup\Controls\PageTitle.ascx.cs:961
User_PageTitle.Page_InitComplete(Object sender, EventArgs e) in C:\Acumatica\LarkGroup\Controls\PageTitle.ascx.cs:318
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Page.OnInitComplete(EventArgs e) +138
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2203

 

and here is my graph and cachext.

    public class PMAccess_Extension : PXGraphExtension<PMAccess>
{
#region Event Handlers
protected void RelationGroup_GroupName_FieldSelecting(PXCache cache, PXFieldSelectingEventArgs e)
{
var row = e.Row as RelationGroup;

if (row != null)
{
if (row.GroupName != null)
{
row.GroupName = row.GroupName.PadLeft(6, '0');
}
}
}
#endregion
}



public class SMRelationGroup_Extension : PXCacheExtension<PX.SM.RelationGroup>
{
#region GroupName
[PXMergeAttributes(Method = MergeMethod.Append)]
[PXCustomizeBaseAttribute(typeof(PXDBStringAttribute), nameof(PXDBStringAttribute.Length), 6)]
[PXCustomizeBaseAttribute(typeof(PXDBStringAttribute), nameof(PXDBStringAttribute.InputMask), "AA-AAA-A")]
public string GroupName { get; set; }
#endregion
}

 

icon

Best answer by aaghaei 31 December 2021, 03:11

View original

1 reply

Userlevel 7
Badge +8

Not sure why but I replaced Field’s whole properties and resolved.

    public class SMRelationGroup_Extension : PXCacheExtension<PX.SM.RelationGroup>
{
#region GroupName
public abstract class groupName : PX.Data.BQL.BqlString.Field<groupName> { }
protected String _GroupName;
[PXMergeAttributes(Method = MergeMethod.Replace)]
[PXDBString(6, IsKey = true, InputMask = ">AA-AAA-A")]
[PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]
[PXSelector(typeof(Search<RelationGroup.groupName, Where<RelationGroup.active, Equal<True>>, OrderBy<Desc<RelationGroup.groupName>>>))]
[PXUIField(DisplayName = "Group Name", Visibility = PXUIVisibility.SelectorVisible, Required = true, Enabled = true, Visible = true)]
public String GroupName
{
get
{
return this._GroupName;
}
set
{
this._GroupName = value;
}
}
#endregion
}

 

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