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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Unanswered

Issue with SalesCreateOrder and dedicated security role

(0) ShareShare
ReportReport
Posted on by 25
Hi folks
 
I would like to call SalesCreateOrder by my own function (from a custom form) like:
 
SalesTableForm salesTableForm = SalesTableForm::construct(SalesTableFormId::None, null);
CustTable      custTableLocal = element.custTable_ds.cursor();
salesTableForm.custAccount(custTableLocal.AccountNum);
boolean created = salesTableForm.create();
 
if (created)
{
    Args args = new Args();
    args.record(salesTableForm.salesTable());
    args.caller(this);
    new MenuFunction(menuItemDisplayStr(SalesTableForEdit), MenuItemType::Display).run(args);
}
 
After several hours of testing and debugging I got an error in the standard class SalesCreateOrder in the following function
 
void create(boolean append = false)
{
    if (!salesTable.SalesId)
    {
        super(append);
        salesTableType.formMethodDataSourceCreate(element, salesTable_ds);
    }
}
 
The highlighted code does nothing, when another role than SystemAdministrator is executing this function, salesTableType is then still "null" and I get the error.
 
I have no idea, why super is doing nothing, the used role has all necessary rights.
 
Markus
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 156 Super User 2026 Season 1

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 121 Super User 2026 Season 1

#3
Zain Mehmood Profile Picture

Zain Mehmood 89 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans