web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

BOX API can't be used from non-interactive sessions error from postman

(3) ShareShare
ReportReport
Posted on by 451
Hi,
 
I am trying to delete a product category through an Odata api call from POSTMAN but I get the BOX API related issue. I think because we get a dialogue when we delete it through UI which is preventing direct delete through API call. Is there any way we can resolve this for my scenario to delete it from Odata API calls.
 
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    237,980 Most Valuable Professional on at
    This is a bug in code that needs to be fixed. Look at the stack trace to see where the Box is used. If it's your code, fix it. If it's some standard functionality, tell us more about it, so we can look at what could be done about it.
  • André Arnaud de Calavon Profile Picture
    301,171 Super User 2025 Season 2 on at
    Hi Dev,
     
    The BOX API is an UI element being called from this OData call. It is a dialog requesting input from a user. This should not be part of any data entity. Check if there is any customization in your environment which is trying to use the BOX class to interact with the user.
  • Dev Profile Picture
    451 on at
    Thanks André  and Martin.
    There is no customization on this functionality however as I mentioned in my question there is a standard dialog that opens when we try to delete a category. Attaching the screenshot and stack trace for your reference.
     
    "stacktrace": "   at Dynamics.AX.Application.Box.verifyGUI()\r\n   
    at Dynamics.AX.Application.Box.getSysBoxForm()\r\n   
    at Dynamics.AX.Application.Box.callSysBoxFormWait(String _text, DialogBoxType _type, DialogButton _defaultButton, String _title, Boolean @_title_IsDefaultSet)\r\n   at Dynamics.AX.Application.Box.callSysBoxFormWait(String _text, DialogBoxType _type, DialogButton _defaultButton, String _title)\r\n   at Dynamics.AX.Application.Box.`yesNo(String _text, DialogButton _defaultButton, String _title, String _bottomText, Boolean @_title_IsDefaultSet, Boolean @_bottomText_IsDefaultSet)\r\n   at Dynamics.AX.Application.Box.yesNo(String _text, DialogButton _defaultButton, String _title, String _bottomText, Boolean @_title_IsDefaultSet, Boolean @_bottomText_IsDefaultSet)\r\n   at Dynamics.AX.Application.Box.yesNo(String _text, DialogButton _defaultButton)\r\n   at Dynamics.AX.Application.EcoResCategory.confirmRetailCategoryDeletion(Int64 _categoryHierarchy)\r\n   at Dynamics.AX.Application.EcoResCategory.`validateDelete()\r\n   at Dynamics.AX.Application.EcoResCategory.validateDelete()\r\n   at Dynamics.AX.Application.EcoResCategory.validateDeleteSubTree()\r\n   
    at Dynamics.AX.Application.EcoResCategory.`validateDelete()\r\n   
    at Dynamics.AX.Application.EcoResCategory.validateDelete()\r\n   a
    t Dynamics.AX.Application.EcoResCategory.validateDeleteSubTree()\r\n   at Dynamics.AX.Application.EcoResCategory.`validateDelete()\r\n   at Dynamics.AX.Application.EcoResCategory.validateDelete()\r\n   at Dynamics.AX.Application.EcoResProductCategoryEntity.`validateDelete()\r\n   
    at Dynamics.AX.Application.EcoResProductCategoryEntity.validateDelete()\r\n   at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateProcessor.DeleteEntity(ChangeOperationContext context, ChangeInfo changeInfo)\r\n   at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.ChangeInfo.ExecuteActionsInCompanyContext(IEnumerable`1 actionList, ChangeOperationContext operationContext)\r\n   
    at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateManager.SaveChanges()\r\n   at Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataDelegatingHandler.<SaveChangesAsync>d__2.MoveNext()"
  • Martin Dráb Profile Picture
    237,980 Most Valuable Professional on at
    To me, it sounds like a bug in the standard application. And I don't see any meaningful way how to design an extension that would fix it. Therefore you'll need to ask Microsoft to fix that.
  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    See if it is completely standard, then I would suggest you to recreate the same code without the dialog and use it in odata call.
  • Martin Dráb Profile Picture
    237,980 Most Valuable Professional on at
    Writing some similar code somewhere else is no solution. It wouldn't skip the standard code called from validateWrite()
  • Layan Jwei Profile Picture
    8,118 Super User 2025 Season 2 on at
    Hi Dev,

    I remember I once faced a similar error when calling a custom service that calls some other methods in another model.
    The solution was for the developers who worked in the other model, to add this line of code before opening the Box dialog
    FormDataUtil::isFormDataSource(table1)
    which means the dialog will only appear if it was called from UI and not through custom services or entities..etc


    but since this is a standard entity, and if u can't find a way to overcome it, then indeed contacting Microsoft would be the solution
     

    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 467 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans