You won't get any AP for flipping a portal, even though all the links and fields get destroyed.

The portal, as it was, will only change it's owner to either **you** (if it was an enemy portal) or to `__ADA__` or `__Jarvis__`, depending on what your and the portal's faction is.
  
This is the result of using the Jarvis virus by a resistance agent on a resistance portal.  
![__Jarvis__ed portal][1] 

 - Flipping a portal means that **ALL** resonators and mods will **change** the owner, they won't be destroyed.  

 - The Capture date will change to the day the portal was flipped and the day counter will reset.

 - The maximum of 1xL8,L7,.. resonators or 2 mods per agent don't apply for the flipping and also if you are level 5, you can flip a portal with a L8 resonator. (You **won't** be able to deploy additional high level resonators or mods above normal limits though.)

 - The cost to flip a portal is 1000 XM per portal's level.

 - Using the Jarvis or ADA by the same faction agent is useful if you want to get rid of blocking links.  
*note that you can't use a Jarvis virus on a green portal and ADA on a resistance portal in order to do so.

 - There is 1 hour cooldown, where the portal won't get flipped after using a Virus, but you will still lose your Virus if you try to do so! Also the portal will not tell you if it is protected or not.

Youtube videos of Viruses in action:  
[Ingress Jarvis virus effects on a linked portal.][2]  
[Jarvis virus used by a resistance agent.][3]


  [1]: https://i.sstatic.net/ZZjg8.jpg
  [2]: http://www.youtube.com/watch?v=5ZiqCU_isF8
  [3]: http://www.youtube.com/watch?v=Zw8PeJ_wbn0