Roles and Type of Relations in Business Account

Userlevel 5
Badge +3


How do I customize the behavior of Role and Type under Relation tab of Business Account? I add new role via Automation Steps below but how can I default a Type based on Role selected? For example if IT Consultant is selected in Role the default Type is Prospect.




Best answer by Naveen Boga 7 May 2021, 10:52

View original

2 replies

Userlevel 7
Badge +17

Hi @kristianharianja,

We can achieve this by having small customization. Based on the ROLE, we have default a type.

Please find the customization code below.

public class BusinessAccountMaintExt : PXGraphExtension<BusinessAccountMaint>
protected virtual void CRRelation_TargetType_FieldDefaulting(PXCache sender, PXFieldDefaultingEventArgs e, PXFieldDefaulting InvokeBaseHandler)
InvokeBaseHandler?.Invoke(sender, e);
var row = (CRRelation)e.Row;
if (row == null) return;

if (row.Role == "ITConsultant")
e.NewValue = "Prospect";

Hope this helps!!

Userlevel 5
Badge +3

Thank you!


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