That’s really good to know. We have been currently using APIs to create and update accounts. It looks like a lot of learning curve with being able to use field dependencies. We have a deadline approaching really soon, so we ended up deciding that we will use the additional API call to update using locations endpoint instead of using field dependencies. Once we meet the deadline, we might try to accomplish this to improve our code and reduce the API calls we are making to Acumatica. My team and I are really thankful to you both for helping us this far! We will get back to this thread when we are improving the code and add if we have any questions.
Thanks a lot Naveen and Sean. We were not sure if a change made to a field via an API would also trigger update on it’s dependent field. Any thoughts?
Hi @Naveen B , The “New Graph” file in Code of customization project is as follows. We are getting compilation errors on this one. using System;using PX.Data;using PX.Data.BQL;using PX.Data.BQL.Fluent;using PX.Objects.CR;using PX.Objects.Location;using PX.Objects.FS;namespace ITHAKASugarFields{ public class TaxFieldDependGraph : PXGraph<TaxFieldDependGraph> { public SelectFrom<BAccount>.View PrimaryDocument; public SelectFrom<BAccount>.View DependentRecords; #region Actions #endregion #region Events protected virtual void _(Events.FieldUpdated<BAccount, BAccount.usrTaxorVATExempt> eventHandler) { PrimaryDAC row = eventHandler.Row; if (row is null) return; UpdateDependentFields(row); } #endregion private protected virtual void UpdateDependentFields(BAccount row) { var dependentRecordCollection = DependentRecords.Select(); foreach (var dependentRecord in dependentRecordCollection)
Thanks Sean. Looking forward to your example!Thanks Naveen for taking a look at it. We have already included “using PX.Objects.CR;” in our imports. And the validation of the project fails. Should we write this in any other folder for it to not throw errors while compilation?Best Regards,Amruta
Hi Sean, Thanks a lot for pointing us in the right direction. My organizations is fairly new to Acumatica and we are making our way into it and we would appreciate all the help we can get. In our example, we have a custom field defined in Business Account > General tab called as “Tax or VAT Exempt” and we are trying to sync it with Business Account > Shipping tab > Tax Zone field. Both the selector fields have the same list of values to choose from. When the value changes in “Tax or VAT Exempt” field, we need it to update the “Tax Zone” field in Shipping tab.We were able to get the “New DAC” file in Code of customization project set to the following content. We do not see any errors during compilation of this:using System;using PX.Data;using PX.Data.BQL;using PX.Data.BQL.Fluent;using PX.Objects.CR;using PX.Objects.FS;namespace ITHAKASugarFields{ [Serializable] [PXCacheName("TaxFieldDependencies")] public class TaxFieldDependencies : IBqlTable { #region Keys and other
Thanks a lot for your detailed answer Stephan! It is really helpful. We were curious if there is a way to do it via API as well. The steps you have described indicate that it needs to be done manually. Please let me know if you need any clarifications. Thanks again for your time.
I was able to add “ExtendToVendor@Action” to ‘businessaccount’ module of the endpoint. But there are couple of required fields on the Vendor screen which needs to be filled out in order to complete extension to Vendor. Since the ‘Action’ is added to ‘businessaccount’ module, I’m unable to add the required fields of Vendor screen to the parameters. Any thoughts on how to accomplish the “ConvertBusinessAccountToVendor” given the circumstances?All the help is greatly appreciated.Best Regards,Amruta
Hi Naveen,Thank you for sharing the information about https://webhook.site/ . It looks really helpful for testing! And I verified that the custom fields is not showing up there as well. We have reached out to Acumatica support about the same issue. They suggested us to upgrade to 2020R2 Upgrade 11 as a resolution to this problem. We will soon be trying that out.I appreciate your quick responses and valuable suggestions. Thanks for your time!Best Regards,Amruta
Thank you for your quick response Naveen. Appreciate it! I am not sure what you meant by "verify with the webhook option" and “publishing the packages on the instance” since we do not use webhooks in our setup. We send the Push notifications to AWS Lambda and we made sure that Push notifications are well formatted when they reach Lambda. We print the Push notification in our Lambda logs and this is where we realized that some of the custom fields were missing just for 2 days.
Thank you for your quick response Naveen. The customization project was unpublished for a while before we started seeing this issue but when we realized about custom fields not coming out of Push notifications, we went back and published the customization project that contained the custom field configurations. Despite the publishing, the custom fields didn't show up in push notifications.
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.