Skip to main content



No record found.

Dynamics 365 Community / Forums / Commerce forum / Can not disable custom...
Commerce forum

Can not disable custom field in receipt layout when return String.Empty

Posted on by Microsoft Employee

HI all,

I have new custom fields in receipt, in request type: GetSalesTransactionCustomReceiptFieldServiceRequest, I return string.Empty but in real receipt, It have a row with data blank.

So how can I disable or remove row blank data return  string.Empty in receipt?

My code:

My receipt bill:


My receipt design:

Thanks for help.

Nghia Song

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Can not disable custom field in receipt layout when return String.Empty

    Hi Ram,

    Thanks a lot for support. Same solution but In D365 Retail, I override request GetReceiptService and use GetReceiptServiceRequest. Then remove the blank row.

    And result:

          XXX Convenience Stores      

     Owned by: XXX Philippines Inc.  

                Pearl Drive              

     Unit 6 & 7, The Pearl Place Bldg.,  

     Pearl Drive cor. Gold Loop Ortigas  

    Center, Brgy. San Antonio, Pasig City

               1605 Pasig PHL            

    VAT Reg TIN: 008-789-736-012        

    Contact....: 8727-2480              



              (Customer  copy)          


  • Verified answer
    Ramshenkar Profile Picture
    Ramshenkar on at
    RE: Can not disable custom field in receipt layout when return String.Empty

    Hi Nghia, 

    These empty space is because you have placed multiple custom fields on the receipt. It will take the space irrespective of data present or not.  There is no standard way available to remove this space during runtime.

    I will suggest below workaround if you can play with the report string data.

    - Override request "GetReceiptRequest" and  use "GetReceiptRequestHandler" populate default receipt string data.

    - Identify blank string in the receipt data something like '|1C|1C' and remove the blank string data as per your requirement. 

    Hope this will help you. 



Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans