Disable detail preview based on condition

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
philmills
User
Posts: 535

Disable detail preview based on condition

Post by philmills »

In my project detail tables can be viewed either by clicking the arrow to the left of the record, or by clicking the row.
I need to disable detail preview for records that do not belong to current user.
I'm guessing I need to add code to ListOptions_Rendered

Using v2022


mobhar
User
Posts: 11660

Post by mobhar »

You may simply try, for example:

// hide detail preview in Orders List page with OrderID = 11075
if ($this->OrderID->CurrentValue == "11075") {
    $option = $this->ListOptions["preview"];
    $option->Body = "";
}

philmills
User
Posts: 535

Post by philmills »

That worked perfectly.
Thanks!


Post Reply