Skip to content
Snippets Groups Projects
Commit 7c5f21e4 authored by Satish's avatar Satish
Browse files

Fixes #729: Special treatment to set default mandatory owner field

parent cc0b2b76
No related branches found
No related tags found
2 merge requests!311Language italian translation,!289Fixes #799, #729, #512
This commit is part of merge request !289. Comments created here will be created in the context of that merge request.
......@@ -19,9 +19,6 @@ mobileapp.controller('VtigerEditController', function ($scope, $api, $mdToast, $
if(newrecord){
if (typeof field.default != 'undefined') field.raw = field.default;
else if (typeof field.type.defaultValue != 'undefined') field.raw = field.type.defaultValue;
// Special case
if (field.type.name == 'owner' && field.mandatory && !field.raw) { field.raw = "19x" + $scope.userinfo.id; }
}
if(!newrecord && value){
field.raw = value;
......
No preview for this file type
......@@ -42,7 +42,12 @@ class Mobile_WS_Describe extends Mobile_WS_Controller {
$groups[$groupsWSId.'x'.$id] = $name;
}
$field['type']['picklistValues']['users'] = $users;
$field['type']['picklistValues']['groups'] = $groups;
$field['type']['picklistValues']['groups'] = $groups;
//Special treatment to set default mandatory owner field
if (!$field['default']) {
$field['default'] = $usersWSId.'x'.$current_user->id;
}
}
if($fieldModel && $fieldModel->get('name') == 'salutationtype') {
$values = $fieldModel->getPicklistValues();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment