Solved

"Cannot be automated" Error in Opportunities - Phantom Display Error?

  • 9 August 2023
  • 2 replies
  • 109 views

Userlevel 4
Badge

I have a customization that generates an error when trying to bring up an opportunity.

I get the error:

Error: The entry form (ID: CR304000, title: Opportunities) cannot be automated. The view MultipleCustomersView doesn't exist.

 

Or when trying to edit the SCREEN in the customization, I see this variation of the same error:

 

The error (frustratingly) does not trip my debugger, so I don’t know exactly where this is happening.

There is a MultipleCustomer class… but I don’t see a MultipleCustomerView anywhere in the C# code/

Here’s the class:

  public class CRMultipleCustomer : IBqlTable
{
#region MultipleCustomerID
[PXDBIdentity(IsKey = true)]
public virtual int? MultipleCustomerID { get; set; }
public abstract class multipleCustomerID : PX.Data.BQL.BqlInt.Field<multipleCustomerID> { }
#endregion

#region OpportunityID
[PXDBString(15, IsUnicode = true)]
[PXUIField(DisplayName = "Opportunity ID")]
[PXParent(typeof(Select<CROpportunity, Where<CROpportunity.opportunityID, Equal<Current<CRMultipleCustomer.opportunityID>>>>))]
[PXDBDefault(typeof(CROpportunity.opportunityID),
PersistingCheck = PXPersistingCheck.Nothing)]
public virtual string OpportunityID { get; set; }
public abstract class opportunityID : PX.Data.BQL.BqlString.Field<opportunityID> { }
#endregion

#region BusinessAccountID
[PXDBInt()]
[PXUIField(DisplayName = "Business Account")]
[PXSelector(
typeof(SearchFor<BAccount.bAccountID>.In<SelectFrom<BAccount>.Where<BAccount.type.IsEqual<
BAccountType.prospectType>.Or<BAccount.type.IsEqual<BAccountType.customerType>.Or<
BAccount.type.IsEqual<BAccountType.combinedType>>>>>), DescriptionField = typeof(BAccount.acctName), SubstituteKey = typeof(BAccount.acctCD))]
[PXRestrictor(typeof(Where<BAccount.type, Equal<BAccountType.prospectType>, Or<BAccount.type, Equal<BAccountType.customerType>, Or<BAccount.type, Equal<BAccountType.combinedType>>>>), "Business Account is {0}.", new System.Type[] { typeof(BAccount.type) })]
public virtual int? BusinessAccountID { get; set; }
public abstract class businessAccountID : PX.Data.BQL.BqlInt.Field<businessAccountID> { }
#endregion

#region ContactID
[PXDBInt()]
[PXUIField(DisplayName = "Contact ID")]
[PXSelector(typeof(Search2<Contact.contactID,
LeftJoin<BAccount, On<BAccount.bAccountID, Equal<Contact.bAccountID>>>,
Where<BAccount.bAccountID, Equal<Current<businessAccountID>>,
Or<Current<businessAccountID>, IsNull>>>),
DescriptionField = typeof(Contact.displayName), Filterable = true, ValidateValue = false)]
[PXRestrictor(typeof(Where<
Where2<Where<Contact.contactType, Equal<ContactTypesAttribute.person>,
Or<Contact.contactType, Equal<ContactTypesAttribute.lead>>>,
And<Where<BAccount.type, IsNull,
Or<BAccount.type, Equal<BAccountType.customerType>,
Or<BAccount.type, Equal<BAccountType.prospectType>,
Or<BAccount.type, Equal<BAccountType.combinedType>>>>>>>>), PX.Objects.CR.Messages.ContactBAccountOpp,
typeof(Contact.displayName), typeof(Contact.contactID))]
[PXRestrictor(typeof(Where<Contact.isActive, Equal<True>>), PX.Objects.CR.Messages.ContactInactive, typeof(Contact.displayName))]
[PXDBChildIdentity(typeof(Contact.contactID))]
public virtual int? ContactID { get; set; }
public abstract class contactID : PX.Data.BQL.BqlInt.Field<contactID> { }
#endregion

 

And it does not exist in this particular customization. (I didn’t write this mess, I’m just stuck with cleaning it up. 

I am not sure where to go from here.

I think this is the part of the AASPX that is the offending part: (CR304000 (Opportunities))

  <px:PXTabItem Text="Multiple Customers" VisibleExp="DataControls["CstPXCheckBox1&quot;].Value == true" BindingContext="form">
<Template>
<px:PXGrid runat="server" ID="CstPXGrid2" SkinID="Details" Width="100%" SyncPosition="True" AllowPaging="True" KeepPosition="False" DataSourceID="ds">
<Levels>
<px:PXGridLevel DataMember="MultipleCustomersView">
<Columns>
<px:PXGridColumn DataField="IsSelected" Width="60" AllowCheckAll="False" Type="CheckBox" TextAlign="Center" CommitChanges="True" />
<px:PXGridColumn DataField="BusinessAccountID" Width="70" CommitChanges="True" DisplayMode="Hint" />
<px:PXGridColumn DataField="ContactID" Width="70" DisplayMode="Text" CommitChanges="True" />
<px:PXGridColumn DataField="QuotedOnDate" Width="90" CommitChanges="True" /></Columns>
<RowTemplate /></px:PXGridLevel></Levels>
<AutoSize Enabled="True" MinHeight="200" /></px:PXGrid></Template></px:PXTabItem></Items>
<AutoSize Container="Window" Enabled="True" MinHeight="250" MinWidth="300" ></AutoSize>
</px:PXTab>

Do I need to have these two things in the same customization? I don’t see how this actually gets referenced, since there is no namespace included in the ASPX file that I can see.

Anyone face anything like this before?

 

 

 

 

 

icon

Best answer by Django 9 August 2023, 05:07

View original

2 replies

Userlevel 7
Badge +5

It looks like there is a customization that is missing or is perhaps unpublished that would have introduced that view.

I would look for a PXSelect type view that would be added via a graph extension in one of the customization projects.

Userlevel 4
Badge

Thanks Django. That’s sort of what I figured. I’m missing source code somehow. I’ll keep searching.

 

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