function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
nagennagen 

Disable Inline Editing

Hi How do I disbale Inline editing.

I have two record types one record type is allows user to read /write the other is one read only.
Depending upon some condition I am setting changing the record type to the "Read Only" record type. In the (Read only) page layout  I have made all the fields readonly , I have also removed/hidden the "Edit" button. But using the inLine editing  users can still make changes even in the "read only" record type.

I read that If I over ride the "Edit" button then inline editing is disable. I wrote a sample S-Control that has a blank HTML page and used it to override the Edit button. Now the "Read Only record" type works file i.e InLine Editing is disable.

But now the Normal Page with "Read/Write" Record Type have Inline Disabled and When I Click on the Edit Button it displays the Blank Page (S-Control).

How do I overcome this problem?

How do I enable Inline Editing for Normal (RW) record types and make editing work for Normal (RW) record types

N

Best Answer chosen by Admin (Salesforce Developers) 
nagennagen
Hi,
I was able to disable the InLine Editing after overriding the Edit Button with this code in the s-control

<html>
<head>
<script src="/soap/ajax/8.0/connection.js">
</script>
<script>
function init()
{
window.parent.location.href = "{!URLFOR($Action.Donation__c.Edit, Donation__c.Id,[retURL=URLFOR($Action.Donation__c.Edit, Donation__c.Id)], true)}";
}
</script>
</head>
<body onload="init()">
<p>&nbsp;</p>
</body>
</html>

When the edit button is clicked the control is transfered to the edit page propoerly, but when I click the save button. The record is saved and the same page is displayed, it does not go back to the details page (with inline editng and edit button) even when I press the cancel button the same page is display as the control is being transfered to the s-control which is transfering back to the edit page, is there some way to disable this on the edit page is displayed..
can i do something like this..
<html>
<head>
<script src="/soap/ajax/8.0/connection.js">
</script>
<script>
function init()
{
if (Page is Detals_Page)
window.parent.location.href = "{!URLFOR($Action.Donation__c.Edit, Donation__c.Id,[retURL=URLFOR($Action.Donation__c.Edit, Donation__c.Id)], true)}";
Else
  window.parent.location.href = "{!URLFOR($Action.Donation__c.view , Donation__c.Id,[retURL=URLFOR($Action.Donation__c.view,
}
</script>
</head>
<body onload="init()">
<p>&nbsp;</p>
</body>
</html>


thanks..

R

All Answers

jpizzalajpizzala
As an administrator, you can disable inline editing by going to Setup -> [App Setup] Customize -> User Interface and unchecking the Enable Inline Editing checkbox.

As for your read-only issue, are the users that are accessing this read-only data system administrators or do they have Modify All Data enabled in their Profile? If this is the case, you may want to think about reassigning Profiles to your team, limiting access privileges as necessary. System administrators can still edit fields marked as Read Only in page layouts.
nagennagen
At the outset let me Thank you for the Info. It works now !!!
VooVeee!!
Most of the users are Standard or Normal Users. If System Admin edits it, its ok.

Thanks
N
nagennagen
Hi,
I would like to know if I can disable Inline Editing for Just one Page Layout /Record Type.
Thanks.
N

jpizzalajpizzala
Nope, it's all or nothing across the org as far as I know.
nagennagen
I need inline editing to work so I cannot turn it off globally,I would like to turn it off page by page.

Would this approach work to disable inline editing:
1. Create a S-Control and use it to overide the "Edit" button.
2. When the Edit button is clicked transfer control to the Edit Page.

This would help is this way:
1. In Read Only Record Type Pages  the edit button is disabled/hidden and since the Edit Button is overidden users cannot do inline editing on this page. (This already works , I have tested it)

2. For Normal Record Type Pages, users can use In-line editing and also when they click on the "Edit" button The S-Control is Activate which would actually transfer control to the normal Edit page.

So is the anyway to write an S-Controll control which would transfer control to the same edit page.

Thanks in advance..
N



nagennagen
Hi,
I was able to disable the InLine Editing after overriding the Edit Button with this code in the s-control

<html>
<head>
<script src="/soap/ajax/8.0/connection.js">
</script>
<script>
function init()
{
window.parent.location.href = "{!URLFOR($Action.Donation__c.Edit, Donation__c.Id,[retURL=URLFOR($Action.Donation__c.Edit, Donation__c.Id)], true)}";
}
</script>
</head>
<body onload="init()">
<p>&nbsp;</p>
</body>
</html>

When the edit button is clicked the control is transfered to the edit page propoerly, but when I click the save button. The record is saved and the same page is displayed, it does not go back to the details page (with inline editng and edit button) even when I press the cancel button the same page is display as the control is being transfered to the s-control which is transfering back to the edit page, is there some way to disable this on the edit page is displayed..
can i do something like this..
<html>
<head>
<script src="/soap/ajax/8.0/connection.js">
</script>
<script>
function init()
{
if (Page is Detals_Page)
window.parent.location.href = "{!URLFOR($Action.Donation__c.Edit, Donation__c.Id,[retURL=URLFOR($Action.Donation__c.Edit, Donation__c.Id)], true)}";
Else
  window.parent.location.href = "{!URLFOR($Action.Donation__c.view , Donation__c.Id,[retURL=URLFOR($Action.Donation__c.view,
}
</script>
</head>
<body onload="init()">
<p>&nbsp;</p>
</body>
</html>


thanks..

R
This was selected as the best answer