Hi so i'm writing a test codeunit in which I need to verify if i can post a sales document.
Now to put in in short i've created a sales header with lines in it in the testcodunit and i made a variable LibrarySales of type Codeunit "Library - Sales".
Now i did following to test the posting of the sales document.
LibrarySales.PostSalesDocument(SalesHeader, true, true);
If it's relevant this returns a value of type code[20], but i have no idea what code that could be maybe the posted sales invoice but i have no idea.
Now i was wondering in what way i'm supposed to use the Assert codeunit not to verify if the posting of the document is successful?
Help would be much appreciated.
Thanks in advance.
Hello - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.
dynamicsuser.net/.../developers
I will open this up to the community in case they have something to add.
Sohail Ahmed
2,725
Super User 2025 Season 2
Sumit Singh
2,610
Jeffrey Bulanadi
2,221