Hi,
If you prepare data just before calling the Generate PDF action, be sure to commit everything and then use CommunityCommons.EndTransaction to end your transaction. The Mendix create / change object is in memory. The Mendix commit sends data to the database but holds it under lock until the transaction ends. The PDF generation runs in a separate transaction so it will not see your latest updates. The EndTransaction forces the transaction to end, nails the data in the database and releases the record locks.
Hi Katalin,
Fix PDF showing old attribute values:
1. Commit your object (the one filled by the user).
2. Immediately do a “Retrieve object from database” using XPath → retrieve by ID.
3. Use this freshly retrieved object as the input for the PDF Generation action.
4. Then generate the PDF.