I create a new Order Status: Synced To B1 in Sales > Orders Status is empty for orders having this new status, but when I open order the status is here Do you have any Idea How to show custom status in orders list grid?

Note That I Updated the Status using REST API by POST to: /rest/all/V1/orders/64/comments

  "statusHistory": {
    "comment": "Success Imported to SAP DocNum:89441",
    "created_at": "2019-06-03 08:20:27",
    "parent_id": 64,
    "is_customer_notified": 0,
    "is_visible_on_front": 1,
    "status": "SyncedtoB1"

enter image description here

enter image description here

1 Answer 1


That should come through

Clear cache

php bin/magento cache:clean

Run indexer

php bin/magento index:reindex

I'm wondering whether your order grid table is a bit behind

Update based on comment

First try this SQL query to sync status between order table and order grid table

update sales_order_grid sog, sales_order so set sog.status = so.status where sog.increment_id = so.increment_id 

Next. Are you setting custom status programatically?

If so code should look like this

use Magento\Sales\Api\OrderRepositoryInterface;

public function __construct(
    OrderRepositoryInterface $orderRepository,
) {
    $this->orderRepository = $orderRepository;

public function method($orderId) {
    $order = $this->orderRepository->get($orderId);

    try {
    } catch (\Exception $e) {
        // handle exception
  • No, It's not fixed
    – Yezzy Sarl
    Commented Jun 2, 2019 at 21:06
  • I haven't access to mysql database, I Updated the Status using REST API by POST to /rest/all/V1/orders/64/comments => {"statusHistory": {"comment": "Success Imported to SAP DocNum:89441","created_at": "2019-06-03 08:20:27","parent_id": 64,"is_customer_notified": 0,"is_visible_on_front": 1,"status": "SyncedtoB1"}}
    – Yezzy Sarl
    Commented Jun 2, 2019 at 22:21
  • If you've got code access you've got sql access webkul.com/blog/magento2-write-custom-mysql-query Commented Jun 2, 2019 at 22:40
  • No, I'm using C# to consume REST API, I haven't access to php code also
    – Yezzy Sarl
    Commented Jun 2, 2019 at 22:47
  • 2
    If you haven't got code or db access there is nothing I can suggest to fix Commented Jun 2, 2019 at 22:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.