Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL forum
Answered

How to update information to a posted batch

Posted on by Microsoft Employee

I use setobjectvalue command to set an infomation to a posted batch but I don't known how to save it properly.

Please help me !.

Thanks all

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to update information to a posted batch

    It's work, thanks Barry

  • Verified answer
    Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    RE: How to update information to a posted batch

    One possibility is to use the "SQL" call to update the batch table.

    The SQL you use will probably look something like "update batch set user6 = 'ABC' where BatNbr = 'whatever' and Module = 'AP'

    You can then use "Call SQL" to execute your sql.

    Make sure you include "and Module = 'AP'" in your SQL - it is legal to have the same batch numbers in different modules.

    You will want to update only the AP one.

    Obviously your code needs to know the batch number - you will probably want to use GetObjectValue to uplift  it.

    And possibly also do a GetObjectValue to uplift the batch Status, and check it out.

    If the Status is U or P, then 03.010 is not likely to be updating the Batch table itself, and it all sounds good.

    But if the Status is anything else, 03.010 may subsequently update the batch table.

    If your code has already done that, you are likely to get an  "another process has updated the batch record" error.

    Hope that helps.

    Barry

  • Suggested answer
    Stef Rose Profile Picture
    Stef Rose 240 on at
    RE: How to update information to a posted batch

    I think your using the wrong command in adding information to an active_status_batch. In my own analyze, the set_object_value command refer to MS Visual Studio C++ library, where each object implanted thru an IDE has specific attributed values. Usually, your local network administrator should be able to first, find the referenced ID of your batch and second, should be able to take intern measures for modifing a script no matter where the batch is in the workflow. In an usual way, modification of script between steps of worflow syncings should not especially require a function of saving or not your modification because it can be done over a unique process and modification of elements while batches are in workflow invoked databases modifications with an automatic recording for modifications done to it.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to update information to a posted batch

    Hi Barry,

    I want to change only user06 field of batch table. I pull that batch and press customize button, the field user06 will be update a character that I want.

  • Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    RE: How to update information to a posted batch

    03.010 shows Released/Posted batches in "enquiry mode" - it shows you the documents/transactions, but you can't change them.

    This is intentional - when an AP Voucher batch is Released, a lot of tables have been updated. To change any financial information would risk introducing integrity errors.

    What field do you want to change?

    Barry

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to update information to a posted batch

    Hi Barry,

    I customize voucher and adjustment entry 03.010.00. I want create a button in that screeen to update some  information in posted batch. Because sometime users do a wrong batch and I want to mark that batch.

  • Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    RE: How to update information to a posted batch

    Which screen are you customizing?

    Which Control?

    Which Event is your code in?

    Barry

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,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans