It sounds like it was not defined as a selector when adding to the mobile screen. Could you provide the code for the the DAC, and the MSDL code you are using to add the fields to the mobile app?
Naveen is correct here, it looks like your primary records and dependent record views are using the same table, and you need to update your FieldUpdated event to use the DAC extension for the second type parameter. If you have a GitHub account, uploading the source code might give us a clearer idea of what your code looks like, and give us the names of some of the custom code you are deploying like the DAC extension.
I’m sorry, that code was meant to be generic and not copied as I didn’t have enough information to fill out any code that would work as you needed, and the code I provided won’t actually accomplish anything copied as is. It was meant as more of a guideline. I’ll take a look later today during lunch and give you a working code example.
Not a problem Greg, I’m happy to help! Let me know if you have any other questions.
Turns out even when using .NET 4.8 Acumatica doesn’t allow you to use C# 9.0 through the customization explorer, I apologize as I didn’t think to test that first. I have replaced the comparisons ‘is’ and ‘is not’ with == and != to avoid the issue you are seeing. using PX.Data;using PX.Data.BQL;using PX.Data.BQL.Fluent;using PX.Objects.CR;using PX.Objects.FS;namespace MyCompany.DefaultProjects{ public class ServiceOrderEntryExtDefaultProject : PXGraphExtension<ServiceOrderEntry> { public static bool IsActive() => true; #region Actions #endregion #region Events protected virtual void _(Events.FieldUpdated<FSServiceOrder, FSServiceOrder.customerID> eventHandler) { FSServiceOrder row = eventHandler.Row; if (row == null || row.CustomerID == null) return; Location serviceOrderLocation = SelectFrom<Location> .Where<Location.bAccountID.IsEqual<@P.AsInt>
Hi Greg!I wanted to keep the code as generic as possible above, but I can definitely give you some concrete examples! I’m not very familiar with the Service Module, but looking at the code for the FSServiceOrder DAC and the ServiceOrderEntry graph, it looks like the ProjectID field is updated when the service contract is changed. It can also default in a value based on the ‘ProjectDefault’ attribute on the DAC, although in this case there is nothing passed in to the attribute constructor, so it should default the ‘No-Project’ id before being overridden by the logic in the BillServiceContractID FieldUpdated event if certain configurations are set up. This may change based on your version or configuration, but I believe using the CustomerID FieldUpdated event should work for you. Snippet and Gist link below. using PX.Data;using PX.Data.BQL;using PX.Data.BQL.Fluent;using PX.Objects.CR;using PX.Objects.FS;namespace MyCompany.DefaultProjects{ public class ServiceOrderEntryExtDefaultProje
Hi Amruta! Field dependencies are widely used in Acumatica, and are easy to implement. My favorite way to do so is typically through the PXFormula attribute, I’ve included a code snippet below that shows how this might work for fields on the same table, just by using attributes.namespace MyCustomization.DAC{ [Serializable] [PXCacheName("My Custom Table")] public class MyCustomDAC : IBqlTable { #region Keys and other fields // ... #endregion #region PrimaryField public abstract class primaryField : BqlString.Field<primaryField> { } [PXDBString] [PXUIField(DisplayName = "Primary Field!")] public virtual string PrimaryField { get; set; } #endregion #region DependentField public abstract class dependentField : BqlString.Field<dependentField> { } [PXDBString] [PXDefault("The default value")] [PXUIField(DisplayName = "Dependent Field!")] [PXFormula(typeof(Default<primaryField>))] public virtual string DependentField { get; s
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.