How to trigger a custom function module on posting in MIRO? - abap

Can anyone help me with triggering or running my function module when someone posts invoice in MIRO or FB60.
I tried with tracing the event, but there is no FM is created in default. So I am unable to get the event details. Please help with this.

Use EXIT_SAPLMRMP_004 for validation before posting:
Open EXIT_SAPLMRMP_004 FM in SE37
There you'll find Z include which you should create.
In the created include place your FM.
Voila!

Related

INotificationConfiguration does not contain a definition for 'Notifiers'

Im following the aspboilerplate documentation to add a custom email notified as per the example on this page:
https://aspnetboilerplate.com/Pages/Documents/Notification-System#multiple-notifiers
The document states the following:
Add it in the PreInitialize method of your module:
Configuration.Notifications.Notifiers.Add<EmailRealTimeNotifier>();
However i get the following error:
INotificationConfiguration does not contain a definition for
'Notifiers'
Ive tried adding what i think are the obvious using statements but thing has worked
The only extension methods that i can see are for Providers and Distributors which error if i attempt to inject the EmailRealTimeNotifier i created.
Can someone help with an explanation or workarround please.
Thanks in advance
Update to ABP v4.4+ to use multiple notifiers.
v4.4 was released in March.
v4.6 (the latest version) was released in May.

CRM 2013 Custom Action Plugin not firing

Wondering if someone could give me a bit of help.
I am trying to use custom actions from CRM 2013, what I have is a custom action "Clone" defined as below.
I have a very simple clone record plugin that clones the passed in target entity and returns the new entity as an output parameter.
The plugin is registered to fire on the Custom action, my plan was to fire this from JavaScript but the plugin never fired so for the time being to test I have been firing this from another plugin. Using the below code.
The other plugin fires and hits the call to the execute method but the other plugin never seems to fire and the response is always null.
If anyone has any ideas what I am missing that would be great.
Thanks in advance chaps
Antony
What just get in my mind is that you have to write your OrganizationRequest("name_of_CustomAction") exactly the same way as you have written named your CA ("..._CLONE")
Have you already tried debugging your PLUGIN ? Do that with the Plugin Registration Tool from Microsoft.
If you've already got this tool just try doing it exactly like this(Step-By-Step Guide how to debug your plugin.

ActivityFeeds.Plugin.ActivityClose stops record creation, How to solve it?

Some times the ActivityFeeds.Plugin.ActivityClose plugin gets registered on the wrong entity and it stops me from creating new records for that entity.
It usually happens after I register a new plugin with the Plugin Registration Tool.
What is the cause? and how do I solve it?
I haven't found the cause, or how to solve it for good, but to make it work again is simple:
Log into the Plugin Registration Tool.
Select View->Display by Entity(Ctrl+Shift+E).
Expand the entity you are having trouble with.
Expand (message)Create.
Finally select the step for ActivityFeeds.Plugin.ActivityClose and Disable it.
--(Don't Unregister it [in case something breaks])
disable/unregistered the following like steps in plugin ActivityFeeds.Plugins.ActivityClose
ActivityFeeds.Plugins.ActivityClose: Update of any Entity
CAUSE
This kind of steps is registered unintentionally when we do some thing like below in screen shots:
Following is the plugin ActivityFeeds.Plugins.ActivityClose, you can see there is no step registered for this plugin.
Registered an assembly.
Right click on assembly name not on plugin, select registered new step.
Just enter update in message field and then press enter
you can see a step ActivityFeeds.Plugins.ActivityClose: Update of any Entity is added to ActivityFeeds.Plugins.ActivityClose

Run code when user deletes module from a page

I'm currently developing a DNN module. It would be nice if we were able to run custom code whenever a module is deleted from a page by the user, and also when a module gets restored from recycle bin.
I haven't found any examples on how this could be done, so I'm not sure if this is possible? Any ideas?
I am unaware of any event mechanism inside DNN where you could set your hooks. You could probably debug the DNN code and trace the call stack until you find a usable spot where you can inject some code (which would likely be destroyed after the next DNN update), or maybe detect a way that was intended to be used by the core team.
However, if a module is deleted from a page, the IsDeleted field in the Modules table is set to true. If it gets restored from the bin, it is again set to false.
You can use a TRIGGER in your Sql Server that fires when the Modules table is updated, checks if the update refers to an IsDeleted field, write stuff into a Notification table, and use Sql Query Notification based on SqlDependency to run some code (see http://www.codeproject.com/Articles/144344/Query-Notification-using-SqlDependency-and-SqlCach for an introduction).
Some steps to go, but it should work (and be less exhausting than climbing the Matterhorn :-) ).
There is absolutely hooks in DNN Platform (DotNetNuke) that a developer can attached C# code to.
While there isn't a turn key example that I can provide at the moment, check out the following:
https://github.com/dnnsoftware/Dnn.Platform/blob/c35fdc7fb75db0438f3b872ce4e279e3ea73e7c2/DNN%20Platform/Library/Entities/EventManager.cs
You are looking to hook onto the ModuleRemoved event by the sounds of it.
Here is an example for the user logging in that you could adapt to your event:
Does DNN fire an event when a user logs in?
I hope this helps in the future.

Proper way to check system requirements for a WordPress plugin

I am curious about the proper way to stop a user from activating my plugin if their system does not meet certain requirements. Doing the checks is easy and I don't need any help with that, I am more curious how to tell WordPress to exit and display an error message.
Currently I have tried both exit($error_message) and die($error_message) in the activation hook method. While my message is displayed and the plugin is not activated, a message saying Fatal Error is also displayed (see image below).
Does anyone know of a better way, that would display my message in a proper error box without displaying Fatal error, it just looks really bad for new users to see that.
Thanks for any help in advance.
This is a little undocumented, as you might have noticed. Instead of die(), do it like this:
$plugin = dirname(__FILE__) . '/functions.php';
deactivate_plugins($plugin);
wp_die('<p>The <strong>X</strong> plugin requires version WordPress 2.8 or greater.</p>','Plugin Activation Error',array('response'=>200,'back_link'=>TRUE));
The lines above wp_die() are to deactivate this plugin. Note that we use functions.php in this case because that's where I have my Plugin Name meta data comment declaration -- and if you use a different file, then change the code above. Note that the path is very specific for a match. So, if you want to see what your path would normally be, use print_r(get_option('active_plugins'));die(); to dump that out so that you know what path you need. Since I had a plugin_code.php where the rest of my plugin code was, and since it was in the same directory as functions.php, I merely had to do dirname(__FILE__) for the proper path.
Note that the end of the wp_die() statement is important because it provides a backlink and prevents an error 500 (which is the default Apache code for wp_die()).
It is only a idea though. Try checking the wordpress version and compare then use php to through custom exception/error. PHP 5.0 try catch can be a good way to do it. Here is some resources.
http://www.w3schools.com/php/php_exception.asp
http://php.net/manual/en/internals2.opcodes.throw.php
You can try the first link. It is pretty basic. Thanks! hope the information will be helpful.