Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL forum
Suggested answer

System Message 28506 -- Must First unnaply Prepay before voiding check

Posted on by Microsoft Employee

Hello,  I'm working with SL2011 FP1

I'm trying to void a check  and the screen  030.40.00  is sending  the  message 28506.

The check that we are trying to void doesn’t have any Prepayment. It is only related with a VO document.

I’m been looking for any relation in APDOC, APTRAN , AP_PPApplicBat, AP_PPApplicDet   and there isn’t any reference with a PP doctype.

Thanks

Carlos Torre

  • Coe-Ane Erasmus Profile Picture
    Coe-Ane Erasmus 455 on at
    RE: System Message 28506 -- Must First unnaply Prepay before voiding check

    Great, adjusting the AP_PP_Reversed stored procedure to exclude the adjgacct did the trick. 

  • Suggested answer
    Ajit Kannan Profile Picture
    Ajit Kannan 1,240 on at
    RE: System Message 28506 -- Must First unnaply Prepay before voiding check

    Hi,

    I have identified the issue tracing the back end through SQL profile. During save operation of the check it shows a pop message (Must First un-apply Prepay before voiding check).

    After updating the value of the field Open type to ‘R’ from the table AP_PPApplicDet and the system allow me to save the Check.

    Thanks,

    Ajit kannan S R

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: System Message 28506 -- Must First unnaply Prepay before voiding check

    Hello,

    The problem is the next SP, that search for Prepayments with the check refnbr but not with the bank account, so, in some cases find the wrong check.

    I added the code for exclude the wrong check and alter the procedure, this is a temporal solution, and after the check was void, returns to the original SP, this is a bug.

    Regards

    ALTER PROCEDURE AP_PP_REVERSED 
     @RefNbr varchar(10) 
    AS 
     
    DECLARE @count1 AS integer 
    DECLARE @count2 AS integer 
    Declare @Ref as varchar(10) 
     
    set @count1 = 0 
    set @count2 = 0 
     
    select @ref = AdjdRefNbr from APAdjust where AdjgRefNbr = @RefNbr and AdjdDocType = 'PP'  /*  and AdjgAcct <> '110201001' */
     
     
    SELECT  @count1 = count(*) 
    FROM AP_PPApplicDet 
    WHERE PPRefNbr = @Ref 
    AND OperType = 'A' 
     
    SELECT  @count2 = count(*) 
    FROM AP_PPApplicDet 
    WHERE PPRefNbr = @Ref 
    AND OperType = 'R' 
     
    if @count1 > @count2 
    Select RecordCount = 1 
    else if @count2 > @count1 
    Select RecordCount = 2 

  • CFROTON Profile Picture
    CFROTON 4,710 on at
    RE: System Message 28506 -- Must First unnaply Prepay before voiding check

    Ajit,

    I am sorry, but the only workaround I had to offer was to look in the AP_PPApplicDet table. The last options would be to run a SQL trace to see if you can see where the process is finding the record, or contact SL Support for help.

    Carolyn

    MSDSL Support Engineer

  • Ajit Kannan Profile Picture
    Ajit Kannan 1,240 on at
    RE: System Message 28506 -- Must First unnaply Prepay before voiding check

    Hi Carolyn,

    Thanks for your response. I don't see any stray records in AP_PPApplicDet and the issue still exists. Appreciate if you can suggest any workaround for this issue.

    Thanks,

    Ajit

  • CFROTON Profile Picture
    CFROTON 4,710 on at
    RE: System Message 28506 -- Must First unnaply Prepay before voiding check

    Carlos,

    Thank you for posting this issue. Looking into this error I did find an old bug written up for it and it looks to be fixed in SL 2015.

    What they found was that when a pre-payment reference number is deleted from a voucher, it was not being removed from the AP_PPApplic table. To resolve your issue manually, you will need to run a script in SQL to remove the stray record. The script would look something like this: (It is suggested to run a select query with these parameters to make sure you only remove the one record you need to)

             Delete from AP_PPApplicDet where VORefNbr = 'NNNNNN'

             *** Replacing the 'NNNNNN' with the reference number the error is returning as associated to this check.

    I hope this helps.

    Thank you,

    Carolyn

    MSDSL Support Engineer

  • Ajit Kannan Profile Picture
    Ajit Kannan 1,240 on at
    RE: System Message 28506 -- Must First unnaply Prepay before voiding check

    Hello All,

    I'm trying to void a check  but it will pop-up the system message 28506.

    screen.png

    Any information is appreciated!

    Thanks,

    Ajit kannan

  • Ajit Kannan Profile Picture
    Ajit Kannan 1,240 on at
    RE: System Message 28506 -- Must First unnaply Prepay before voiding check

    Hello,

    We are having the same issue.Have you learned anything since your post from over a year ago...

    Thanks,

    Ajit Kannan S R

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,558 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,645 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans