Replies posted by paramesh
For anyone facing the same issue in future: If you’re using OAuth API with scope “api:concurrent_access”, Acumatica will use a Session Cookie for concurrent user tracking. So if we’re calling the API again for the same user, we will have to pass the cookie again, if not Acumatica will consider the new API request as a new user, and it will count towards the limits.We solved the issue by passing the cookies back for API requests if it’s from the same user.
The use case that I’m trying to do is that - as part of entering a manual discount, users should pick a discount code to mention the type of manual discount they’re trying to apply - so that it can be used for reporting later.
Hi @ray20 , @Naveen B , Thanks for your input. Both of your options worked for me.The problem was with our existing field - maybe the DB column was incorrect when I created first time, and even when I deleted and recreated, it was still not working. I just created new fields and they're working fine now.Thanks and have a nice day!Paramesh
Hi @ray20, Your idea gave me some inspiration to try out the PXSelector, but when I use it, I always get this error: Specified cast is not valid:I converted yours into a Customer reference, something like:[PXDBInt][PXUIField(DisplayName="Test Customer")][PXSelector(typeof(Customer.bAccountID),SubstituteKey = typeof(Customer.acctCD),DescriptionField = typeof(Customer.acctName))]
Thank you, Ray.I am new to Acumatica, so here are the steps that I did:Create the new field like this:Added the Customer line (copied from Customer ID field) and published it once.[PXDBInt][PXUIField(DisplayName="Test Customer")][CustomerActive(Visibility = PXUIVisibility.SelectorVisible, DescriptionField = typeof(Customer.acctName),Filterable=true, TabOrder=2)]Added it to the UI screen:Added the Field and published again:After publishing, it doesn’t allow me to view the record, and says “Invalid Cast”.And the UI label always defaults to “Customer” as well, in the form layout.By DAC, do you mean the source code? Thanks again for your help!
Thank you very much for your help, Naveen. It does seem odd that we have to call logout even for OAuth, since the Access Token is valid for 60 minutes, and we are reusing the same token between multiple API calls, without having to store cookies or authorize repeatedly. Your second point seems interesting though, concurrent calls are definitely a possibility. - I thought we can have 6 concurrent requests to Acumatica (based on our license). I’ll raise a ticket with Acumatica Dev Support to see what they have to say.
Thank you for your help, @Naveen B . Do we need to call logout for OAuth as well? I thought it’s required only for screen based APIs. For OAuth, I just generate one access token for an entire hour and use it over several API calls (all within limit). We are in Large Tier 1, and we are not hitting the limit. But, I’m also surprised we have only 150 API requests per minute when compared to your screenshot. Can you please let me know how to adjust the limit?
Login to the community
Social LoginLogin with your Acumatica account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.