Logic hook executing from mass update

Hi,

I have an after_save logic hook that works well at redirecting a record back to EditView after being saved.

Only problem is, when I make a change to a record in list view with mass update…it then takes me to that record which I do not want at all!

Is there any criteria I can make an if statement out of that would make sure the logic hook only fires when in edit view of a record?

Thanks

Hi there,

You could check which view you are editing the record from? Or check if the record is being mass updated and if so don’t fire.

In terms of code, I’ve not got the knowledge to inform you how/where you would make these changes.

Thanks,

Will.

Well that’s what I’m after, how do I check the view or if it’s from mass update in the if statement?

I’ve tried if ($view == EditView) but that didn’t work.

Hi,

Request should have

$_REQUEST[‘massupdate’] == true and

$_REQUEST[‘action’] == massupdate

Where does the $_REQUEST==true bit go?

I’ve tried: if ($_REQUEST==“massupdate”)

but that doesn’t work?

I did it with:
$_REQUEST[‘massupdate’]

Hi ,

Sorry, some how post do not saved properly.

I mean condition should be like …



$_REQUEST['massupdate'] == 'true'  && $_REQUEST['action'] == 'MassUpdate'