Skip to content
Snippets Groups Projects
Commit f78501c4 authored by Prasad's avatar Prasad
Browse files

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

parent 64eec17d
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,9 @@ 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;
......
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