Content Standard GuideTitleAC: Discarded Sales Invoice and Sales Credit Note are getting regeneratedURL NameDiscarded-Sales-Invoice-and-Sales-Credit-Note-are-getting-regeneratedInformationProduct AreaHelp Product AreaAccounts ReceivableRelease VersionHelp Release VersionSymptomsHelp Symptoms1. Open any Sales Invoice or Sales Credit Note that is in "In Progress" status and has a Billing Document number on it2. Click Discard3. Enter a reason and click Discard4. SIN/SCR is now discarded5. Observe that the Billing Document Number from the Discarded SIN/SCR is removed6. And a new SIN/SCR is now automatically generated for the same Billing DocumentEnvironmentHelp EnvironmentAccountingAll VersionResolutionHelp ResolutionUse the return mappings and a checkbox to stop the automatic regeneration of the SIN/SCN after discarding it. Step 1 - Creating the Custom Checkbox to stop the regeneration of Sales Invoice/Sales Credit Note. Go to Setup, and click on 'Object Manager'In Object Manager search for Billing DocumentGo to Fields and RelationshipsClick New to create a new custom checkbox that we can use in the return Mappings Select Checkbox and NextChoose a name such as 'Auto Create Sales Invoices or Credit Note'. And ensure that the default value checked is selected. Click NextAdd the visibility and the page layouts that you want for your OrganizationClick Save and then check if it is present in Fields and Relationships. This checkbox can be used for both the Sales Invoices and Sales Credit Note Step 2 - Adding to Return Mappings In the App launcher search for 'BD to SIN Mappings'In the Sales Invoice to Billing Document Return Mappings, Click Add MappingSource Type will be Static, with the Source Description Set as False. And the Source Data as FalseTarget Type will be Field and for Target Field select the 'Auto Create Sales Invoice or Credit Notes'. Click SaveRepeat this step for BD to SCN Mappings if you want to enable it for the Return mappings for Sales Credit Note. These return mappings for the Checkbox will need to be done for both the SIN and SCN Mappings, however you can use the same checkbox field. Step 3 - Amending the Custom Setting Go to Setup and in Quick Find search for 'Custom Settings' Filter by ‘B’ to get the Billing Document to Sale invoiceOpen the Billing Document to Sales Invoice and click EditThen paste the API name from the custom checkbox that was made to the Auto Create Invoice or Credit Field (To find the API name go to Object Manager > Billing Document > Fields & Relationships > Copy the Field Name/API name of the field 'Auto Create Sales Invoice or Credit Notes')Click Save, and so auto creation of sales invoice or credit note is enabled, but if you were to discard the Sales invoice, it would no longer regenerate. CauseHelp CauseThis issue has been identified as a defect.An enhancement will be introduced in an upcoming major release to fix this issue. To fix the issue in the current version, see the workaround.Additional NotesHelp Additional NotesIf you wish to recreate a Sales Invoice, you can click the Create Sales Invoice or Credit Note Button on the Billing Document.
Was this article helpful?00Choose a general reason-- Choose a general reason --FeedbackUpload FilesUpload FilesOr drop filesSubmit