If it's working with Esri objects, but not ArcFM objects, then it could be due to not having a license.
You mentioned that you had looked at a sample. Was it this article? It's got some sample python code to check out an ArcFM license and set the AU mode to server (to suppress any UI popups that AUs may try and show - which could cause it to hang or crash). You'll want the ArcFMSampleUpdated.py.zip attachment, and will need to preface the actual editing with the ArcFM license checkout and au-mode change.