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

Notifications

Announcements

Community site session details

Community site session details

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

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

(0) ShareShare
ReportReport
Posted on by

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:
pastedimage1594784834727v1.png

My receipt bill:

pastedimage1594784969902v3.png

My receipt design:
pastedimage1594785071720v8.png


Thanks for help.

Nghia Song

I have the same question (0)
  • Verified answer
    Ramshenkar Profile Picture
    on at

    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. 

    Regards, 

    Ram

  • Suggested answer
    Community Member Profile Picture
    on at

    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              

    -------------------------------------

      SALES INVOICE  

              (Customer  copy)          

    -------------------------------------

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
André Arnaud de Calavon Profile Picture

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

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 107 Super User 2026 Season 1

#3
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 75

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans