Dear Team,
How to add "Inventory" Type of "Source" Role in "RELATIONS" Tab on Cases screen ?
The expected results are as follows:
Best Regards,
NNT
Best answer by andriikravetskyi35
View originalDear Team,
How to add "Inventory" Type of "Source" Role in "RELATIONS" Tab on Cases screen ?
The expected results are as follows:
Best Regards,
NNT
Best answer by andriikravetskyi35
View originalQuick tip: To modify the list of Type field, you have to inherit the CRRelationTypeListAttribure attribute and make changes to it. Good Luck,
https://riptutorial.com/acumatica/example/29102/modifying-marital-statuses
Hi,
I did it in fast way and my stringList will have always the same values, but you might use my logic as template and add your custom list, that depends from type:
public class CRCaseMaintExt : PXGraphExtension<PX.Objects.CR.CRCaseMaint>
{
[PXMergeAttributes(Method = MergeMethod.Merge)]
[TestInheristanceClass(typeof(PX.Objects.CR.CRRelation.role))]
protected virtual void _(Events.CacheAttached<PX.Objects.CR.CRRelation.targetType> e) { }
}
public class TestInheristanceClass : PX.Objects.CR.CRRelationTypeListAttribure
{
public TestInheristanceClass(Type RoleType) : base(RoleType)
{
}
public override void FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e)
{
base.FieldSelecting(sender, e);
// string text = sender.GetValue(e.Row, base.RoleType.Name) as string;
// Item targetType = GetTargetType(text);
e.ReturnState = (PXStringState)PXStringState.CreateInstance(e.ReturnState, null, null, _FieldName, null, -1, null,new string[]{ "1","2"},new string[] { "a", "b"}, true, null, null);
//if (e.Row != null)
//{
// ((PXFieldState)e.ReturnState).Enabled = ((PXFieldState)e.ReturnState).Enabled && text != null;
//}
}
}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.