How do you remove a relationship field's inline edit?

I have a packaged module named Timesheet with a many to one relationship with Users, making a relational field in Timesheet.

In Studio it shows up as ‘Assigned to’ in Layouts.

How do I set its inline edit off?

I’ve tried


$dictionary['time_MonthlyTimesheet']['fields']['time_monthlytimesheet_users']['inline_edit']='';

in Timesheet’s Vardefs, but it doesn’t work. I think it could if I had the proper field name.

Under “custom/Ext/modules/” there should be files resulting from whatever you did in Studio, you should be able to get the proper field names from there.

Please do like this, you forget to add “FALSE”

$dictionary['time_MonthlyTimesheet']['fields']['time_monthlytimesheet_users']['inline_edit']=FALSE;
1 Like

I’ve tried the following variables and users can still inline edit


$dictionary['time_MonthlyTimesheet']['fields']['time_monthlytimesheet_users']['inline_edit']=false;
$dictionary['time_MonthlyTimesheet']['fields']['time_monthlytimesheet_users_name']['inline_edit']=false;
$dictionary['time_MonthlyTimesheet']['fields']['time_monthlytimesheet_usersusers_ida']['inline_edit']=false;

As shown by the red pencil under the Assigned to field:
https://i.imgur.com/MFA64yc.png

Can I remove non-admin users ability to inline edit?

have you did “Quick Repair and Rebuild” after putting this code??

Also try this

The field name should be “assigned_user_name”

$dictionary['time_MonthlyTimesheet']['fields']['center_admin_c']['assigned_user_name']='0';

If you need instant reply please join me via skype.

Thanks

Both didn’t work but I’m just gonna restrict some users ability to see Listview.

Hi,
I tried this and it worked
Please copy this and USE this exact code

$dictionary['Contact']['fields']['assigned_user_name']['inline_edit'] = 0;

Thanks

If its the default assgined user name field, then you should place following line in the file that you would create at

custom/Extension/modules/time_MonthlyTimesheet/Ext/Vardefs/sugarfield_assigned_user.php


$dictionary['time_MonthlyTimesheet']['fields']['assigned_user_name']['inline_edit']=false;

After creating the file with content, please run Quick Repair/Rebuild from Admin.

1 Like
$dictionary['time_MonthlyTimesheet']['fields']['assigned_user_name']['inline_edit'] = 0;

sorry i put the “Contact” instead of your Module name.

i tried editing

/custom/Extension/modules/time_MonthlyTimesheet/Ext/Vardefs/sugarfield_assigned_user.php

and repairing, but the repair gets stuck at

‘Rebuilding Relationships’ now :S

Hi,
Can you please show me your CRM at skype? This will be a simple approach to help you out.

Thanks a lot