AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • In-Person Gatherings
    • Power BI Workshop
    • Podcast
    • Rolodex
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Everything Else
Modify default vend...
 
Notifications
Clear all

Questions Modify default vendor status

 
Everything Else
Last Post by Tim Rodman 7 years ago
3 Posts
2 Users
0 Reactions
4,440 Views
RSS
kevin.ruppert
Posts: 47
 kevin.ruppert
Topic starter
June 25, 2019 3:46 pm
(@kevin-ruppert)
Trusted Member
Joined: 6 years ago

I am trying to modify the default vendor status to On Hold as opposed to Active when a new vendor is created. When creating a customization project I don’t see where I can modify the attributes in the VendorR status only the Vendor status. As such I get an error during validation. Has anyone else every modified the default status for a vendor?


2 Replies
Tim Rodman
Posts: 3204
 Tim Rodman
Admin
July 29, 2019 8:25 pm
(@timrodman)
Famed Member
Joined: 11 years ago

Hi Kevin,

I'm also getting an error. I actually just tried overriding the default value on the screen level, but didn't even change the Status value and I still get an error.

 


These are the changes that I made:

 


Here is the code that I used which I made no changes to, just let it default:

using System;
using System.Collections.Generic;
using System.Collections;
using System.Globalization;
using System.Linq;
using PX.Data;
using PX.Objects.CS;
using PX.Objects.CA;
using PX.Objects.CR;
using PX.Objects.CM;
using PX.Objects.Common;
using PX.Objects.GL;
using PX.Objects.PO;
using PX.Objects.TX;
using PX.SM;
using Branch = PX.SM.Branch;
using PX.Objects;
using PX.Objects.AP;

namespace PX.Objects.AP
{
public class VendorMaint_Extension : PXGraphExtension
{
#region Event Handlers


[PXDBString(1, IsFixed = true)]
[PXUIField(DisplayName = "Status", Required = true)]
[status.List()]
[PXDefault(status.Active)]
protected virtual void VendorR_Status_CacheAttached(PXCache cache)
{

}



#endregion
}
}

 


And this is the error that I get:

\App_RuntimeCode\VendorMaint.cs(29): error CS0246: The type or namespace name 'status' could not be found (are you missing a using directive or an assembly reference?)

\App_RuntimeCode\VendorMaint.cs(30): error CS0103: The name 'status' does not exist in the current context

\App_RuntimeCode\VendorMaint.cs(29): error CS0246: The type or namespace name 'status' could not be found (are you missing a using directive or an assembly reference?)


Reply
Tim Rodman
Posts: 3204
 Tim Rodman
Admin
July 29, 2019 9:28 pm
(@timrodman)
Famed Member
Joined: 11 years ago

Ok, I think I figured it out with the help of this post on StackOverflow:

https://stackoverflow.com/questions/56795848/acumatica-error-when-customizing-marketing-campaign-screen

 

It can't find Status within the PX.Objects.AP namespace because it's actually in the PX.Objects.CR.BAccount namespace.

So the solution was to add PX.Objects.CR.BAccount in front of the two status field references in the code like this:

 


 

Here is the full code, cleaning up all the white space from the previous post:

using System;
using System.Collections.Generic;
using System.Collections;
using System.Globalization;
using System.Linq;
using PX.Data;
using PX.Objects.CS;
using PX.Objects.CA;
using PX.Objects.CR;
using PX.Objects.CM;
using PX.Objects.Common;
using PX.Objects.GL;
using PX.Objects.PO;
using PX.Objects.TX;
using PX.SM;
using Branch = PX.SM.Branch;
using PX.Objects;
using PX.Objects.AP;

namespace PX.Objects.AP
{
  public class VendorMaint_Extension : PXGraphExtension<VendorMaint>
  {
    #region Event Handlers
    [PXDBString(1, IsFixed = true)]
    [PXUIField(DisplayName = "Status", Required = true)]
    [PX.Objects.CR.BAccount.status.List()]
    [PXDefault(PX.Objects.CR.BAccount.status.Inactive)]
    protected virtual void VendorR_Status_CacheAttached(PXCache cache)
    {
    }
    #endregion
  }
}

 

I think this is a great example of where Customization Projects can become a slippery slope very quickly.

It's nice that Acumatica is moving more "easy" customization capabilities into Customization Projects (like adding reports to existing screens) because the old Automation Steps did not perform well and caused a lot of problems.

But, the downside of Customization Projects is that they have heavy duty industrial strength capabilities (full solutions like JAMS Acumatica Manufacturing are just a Customization Project) and you can quickly cross the line from doing something simple into doing something complicated that you need to be a developer to fully understand. That's where StackOverflow is helpful, for developers.

I like Customization Projects, but I'm not a developer so I'm still trying to feel out when I'm using a Customization Project and I've crossed the line into territory that would be better handled by a developer with full knowledge of .NET, C#, Visual Studio, etc.


Reply
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,532 Topics
  • 11 K Posts
  • 35 Online
  • 2,418 Members
Our newest member: Chad Treadwell
Latest Post: Limited or no support from Acumatica?
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2026 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×