{"action":"created","issue":{"url":"https://api.github.com/repos/Penneo/sdk-net/issues/50","labels_url":"https://api.github.com/repos/Penneo/sdk-net/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/Penneo/sdk-net/issues/50/comments","events_url":"https://api.github.com/repos/Penneo/sdk-net/issues/50/events","html_url":"https://github.com/Penneo/sdk-net/issues/50","id":115524988,"number":50,"title":"Assigning case file templates to case files","user":{"login":"ahmadnazir","id":527355,"avatar_url":"https://avatars.githubusercontent.com/u/527355?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmadnazir","html_url":"https://github.com/ahmadnazir","followers_url":"https://api.github.com/users/ahmadnazir/followers","following_url":"https://api.github.com/users/ahmadnazir/following{/other_user}","gists_url":"https://api.github.com/users/ahmadnazir/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmadnazir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmadnazir/subscriptions","organizations_url":"https://api.github.com/users/ahmadnazir/orgs","repos_url":"https://api.github.com/users/ahmadnazir/repos","events_url":"https://api.github.com/users/ahmadnazir/events{/privacy}","received_events_url":"https://api.github.com/users/ahmadnazir/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Penneo/sdk-net/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"chrsadk","id":1178795,"avatar_url":"https://avatars.githubusercontent.com/u/1178795?v=3","gravatar_id":"","url":"https://api.github.com/users/chrsadk","html_url":"https://github.com/chrsadk","followers_url":"https://api.github.com/users/chrsadk/followers","following_url":"https://api.github.com/users/chrsadk/following{/other_user}","gists_url":"https://api.github.com/users/chrsadk/gists{/gist_id}","starred_url":"https://api.github.com/users/chrsadk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrsadk/subscriptions","organizations_url":"https://api.github.com/users/chrsadk/orgs","repos_url":"https://api.github.com/users/chrsadk/repos","events_url":"https://api.github.com/users/chrsadk/events{/privacy}","received_events_url":"https://api.github.com/users/chrsadk/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-11-06T15:23:33Z","updated_at":"2015-11-09T10:15:41Z","closed_at":null,"body":"I have been going through the documentation at for creating [casefiles](https://github.com/Penneo/sdk-net/blob/master/docs/templates.md#creating-a-case-file-from-a-template). However, I can see that the case file template is not persisted when the SetCaseFileTemplate() function is called:\r\n\r\n```\r\n// Create a new case file\r\nvar myCaseFile = new CaseFile();\r\n\r\n// Get the case file templates available to the authenticated user\r\nvar availableTemplates = myCaseFile.GetTemplates().Objects;\r\n\r\n// Assign the first list item as the case file template\r\nmyCaseFile.SetCaseFileTemplate(availableTemplates.First());\r\n```\r\n\r\nCan you please elaborate?\r\n"},"comment":{"url":"https://api.github.com/repos/Penneo/sdk-net/issues/comments/155020232","html_url":"https://github.com/Penneo/sdk-net/issues/50#issuecomment-155020232","issue_url":"https://api.github.com/repos/Penneo/sdk-net/issues/50","id":155020232,"user":{"login":"ahmadnazir","id":527355,"avatar_url":"https://avatars.githubusercontent.com/u/527355?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmadnazir","html_url":"https://github.com/ahmadnazir","followers_url":"https://api.github.com/users/ahmadnazir/followers","following_url":"https://api.github.com/users/ahmadnazir/following{/other_user}","gists_url":"https://api.github.com/users/ahmadnazir/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmadnazir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmadnazir/subscriptions","organizations_url":"https://api.github.com/users/ahmadnazir/orgs","repos_url":"https://api.github.com/users/ahmadnazir/repos","events_url":"https://api.github.com/users/ahmadnazir/events{/privacy}","received_events_url":"https://api.github.com/users/ahmadnazir/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T10:15:41Z","updated_at":"2015-11-09T10:15:41Z","body":"I did persist the case file. It still doesn't work. I used the LatestServerResult to find out that `VisibilityMode` is not part of the mapping when the case file is being updated, and the API requires it to be present.\r\n\r\nThis is the json response that I get:\r\n\r\n```\r\n{\"code\":400,\"message\":\"Validation Failed\",\"errors\":{\"children\":{\"title\":[],\"metaData\":[],\"sendAt\":[],\"expireAt\":[],\"visibilityMode\":{\"errors\":[\"This value should not be null.\"]},\"caseFileTypeId\":[],\"sensitiveData\":[],\"reference\":[]}}}\r\n```\r\n\r\nThe API has always required the `visibilityMode` to be present for updates (even though the documentation doesn't say so). This just means that none of the sdk users are relying on the case file update functionality. Either the API or its documentation should be updated.\r\n\r\nNonetheless, I suggest that the sdk should allow the visibility mode to be updated as well."}}