05-01-2013 02:12 PM
Thanks Mike. I can now see an exception logged to the event viewer from that event, so it looks as if the assembly is being called. I appreciate you sticking with me on it.
05-03-2013 08:34 AM
I don't know quite what I'm doing wrong, but this still isn't working.
It worked twice, but now I've since done something and it isn't firing at all, again. Theres nothing in the event viewer except a lot of complaints about memcache.
What is the most effective way to step through the app to ensure that the external assembly is being called?
05-03-2013 12:30 PM
Note that you will probably NOT be able to step thru your external assembly unless you also add it to the solution and delete the dll from the bin folder of the website.
05-07-2013 07:51 AM - edited 05-07-2013 08:43 AM
Here's what I have found so far.
For the Account entity I defined the Primary Step in OnAfterInsert to be the method from Sage.SalesLogix.BusinessRules.
For the Post Flush step of OnAfterInsert, I define the OnAfterInsert method from my external assembly. I chose Post Flush because I need to access data stored in the Contact for the Account, and when I attempted to query it in other events I was not getting a valid reference to it. Built, then deployed.
I see many csproj files across several folders in the build diretory, so I grabbed two: Sage.Entity.Interfaces and Sage.SalesLogix.Entities.
I deleted the external assembly from the web BIN directory and instead added a Project reference to the web - the project that contains the external assembly. I then set 3 breakpoints - one in Account.cs at the base OnAfterInsert, one in a method on the Insert Account web control (for sanity purposes), and the other on the OnAfterInsert method defined in my exernal assembly.
I did get 25 thousand (really, 25k) build errors between the two Sage Entity projects but I ignored them and ran the web project anyway. I get a message from VS complaining about a temp file that isnt set to debug mode, but I skip it.
The one in the external assembly is never hit.
So let me back up and restate my assumption - that OnAfterInsert will fire after saving a new Account. If this is true, which it appears to be based on the first breakpoint, then my second one still is not being hit.
EDIT - Changed the Primary step to my external assembly, and removed the Post Flush step, and it still didn't hit the breakpoint.
2nd EDIT - Added it to Post Execute, no breakpoint. I'm pretty much throwing stuff at the wall now to see if anything sticks.
3rd EDIT - Using a code snippet didn't even work. Totally at a loss as to why this isn't working on any level.