Hi, the mechanics of the approval you get for free. Take the MS sales order approval workflow template, set the approver in Approval User Setup, and once the order goes to Pending Approval nobody can release or post it, so the posting side is covered.
What standard can't give you is the trigger. Workflow event conditions are plain record filters on the sales header, and what you describe is a line check plus a comparison between two fields, so there is no way to put it in the setup. It needs an extension, and I'd do it as a custom workflow event that walks the lines and raises the approval request. Careful with the obvious shortcut though, if you create the request in a subscriber and then throw an Error to stop the release, the rollback takes the request away with it. Better to block release with a message asking the user to send it for approval, or handle the release event, start the workflow and come out without an error.
Glad to help - follow up if anything is unclear.
► If this solved it, marking it verified helps others too.
Regards,
Grigorios Mavrogeorgis
Business Central Consultant & AL Developer
Work: Gmsoft Limited
Blog: insidebusinesscentral
LinkedIn: linkedin.com/in/gregorymavrogeorgis