Is it possible to rearrange native tabs based on r...
# suitescript
e
Is it possible to rearrange native tabs based on record mode? I want the Shipping tab to show first when entering a Sales Order, but I want the Item tab to show first when viewing the Sales Order
j
In a beforeload, you could redirect the user to creating a new record with &selectedtab=xxx added to the URL.
e
Definitely. I just wasn't sure if there was a "supported" way of moving tabs
e
You can try on a UE beforeLoad to get the tabs and then change the container value for each tab you want to “move”
b
e
Ah I found my issue-- I was using the sublist ID's - 'item' and 'salesteam' When I needed to use - 'items' and 'teamselling' Thank you all! @Eric B @battk @JessicaL Here's the working code:
Copy code
function beforeLoad(context) {
    let form = context.form;
    let itemTab = form.getTab({
        id: 'items'
    });
    form.insertTab({
        tab: itemTab,
        nexttab: 'teamselling' 
    });
}