Forums: [SOLVED] Hide "Show Details" Link/Icon - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

[SOLVED] Hide "Show Details" Link/Icon Rate Topic: -----

#1 User is offline   i.NoLim 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 93
  • Joined: 11-September 17

Posted 25 April 2019 - 11:09 PM

I have a master table called "Expenditures and Encumbrances" and child table called "Releases." I would like for the "Show Details" link/icon to show only when the "Transaction Type" in "Expenditures and Encumbrances" is equal to "Encumbrances."

For testing purposes I tried all of the following in the "Javascript onload event" but no luck, any help will be appreciated.

var id = "details-badge badge Releases_badge";
var button = $("[id^=" + id + "]");
Runner.addDisabledClass(button);

var id = "details_29_Releases";
var button = $("[id^=" + id + "]");
Runner.addDisabledClass(button);

var id = "glyphicon glyphicon-th-list";
var button = $("[id^=" + id + "]");
Runner.addDisabledClass(button);

var id = "grid_details_link";
var button = $("[id^=" + id + "]");
Runner.addDisabledClass(button);



Posted Image
image uploader
0

#2 User is offline   timnorvel 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 286
  • Joined: 21-September 07
  • Gender:Male
  • Location:Minnesota, USA

Posted 26 April 2019 - 01:13 PM

I think you can do this in the "List page: After record processed" event.


if (data["TransactionType"].ToString() ==  "Encumbrances") {
	pageObject.hideItem("grid_details_link");
}




I think this would work. If you're using version 10.x you can easily find the ID of the details link element, but what I have above is the default name if there is only one link (I think).


Good luck.
Tim
0

#3 User is offline   i.NoLim 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 93
  • Joined: 11-September 17

Posted 26 April 2019 - 05:03 PM

View Posttimnorvel, on 26 April 2019 - 06:13 AM, said:

I think you can do this in the "List page: After record processed" event.


if (data["TransactionType"].ToString() ==  "Encumbrances") {
	pageObject.hideItem("grid_details_link");
}




I think this would work. If you're using version 10.x you can easily find the ID of the details link element, but what I have above is the default name if there is only one link (I think).


Good luck.
Tim


Thank you very much! You steered me in the right direction, I just had to add "recordId" to hide the ones I wanted. As it is, the code hides all "Show Details" icons.

Working code:

if (data["TransactionType"].ToString() ==  "Expenditure") {
	pageObject.hideItem("grid_details_link", recordId); 
}


Thank you again.
0

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users