Jean-Yves STURM Posted October 4 Share Posted October 4 I create a Smart Event to email user when Purchase Request is rejected Here is my condition: {!PODOCUMENT.STATE!} == 'Declined' But for some reasons its not working. Ive tried with the following condition : {!PODOCUMENT.STATE!} == 'Submitted', and it's working Does someone know why I don't receive the emails? Link to comment Share on other sites More sharing options...
Miles Liscum Posted October 8 Share Posted October 8 Try putting the condition into the body of the email and set the actual condition to 1 == 1 (or leave it blank) so that it is guaranteed to fire. This way you can validate that Declined is the right value. You might also want to try double quotes, though I'm not sure it matters but it's how I've always written Smart Event and Smart Rule conditions. But as I'm thinking about this more, I don't know that you can trigger a Smart Event off of a Decline directly because (I think) there may not be a direct update to the PODOCUMENT record, aka the "set" never happens in this scenario. Instead, a PODOCUMENTAPPROVAL (Purchasing approval history) record gets created and what you see in the UI is simply a lookup to that record. When a user Submits it for approval, however, there is a DB commit (save + submit in reality I believe) which may be why it works for 'Submitted.' This is all just a guess but I know I've run into issues before working with approvals and smart events. Lastly, I think this might have been part of the discussion during the recent Partner Office Hours on Platform Triggers (which touched on Smart Events as well). If you search "20240918 - Platform Triggers POH" in the community you should find the slides & recording link*. *I'll try pasting it here in a follow-up comment but have had issues with links here before. Link to comment Share on other sites More sharing options...
Miles Liscum Posted October 8 Share Posted October 8 Community link: https://community.intacct.com/community/069Rn00000Fqsy9?retUrl=%2Fcommunity%2F_ui%2Fsearch%2Fui%2FUnifiedSearchResults%3Fstr%3Dpoh%2Bplatform%26sen%3D068%26sen%3D0F9%26sen%3D003%26sen%3D005%26sen%3D500%26sen%3D0TO%26sen%3Dka Link to recording: https://intacct.box.com/s/jiacfzkrwu6hu0af9wf0cc4qhav9nxac Link to comment Share on other sites More sharing options...
Recommended Posts