private KeyValuePair <string, string>[] GetKeyValuePairsFromKeyValues(PXGraph graph, string viewName, string keyValues)
        {
            string[] keyNames = graph.GetKeyNames(viewName);
            string[] keyValuesArray;
            if (keyNames.Length == 1)
            {
                keyValuesArray = new string[1] {
                    keyValues
                };
            }
            else
            {
                keyValuesArray = keyValues.Split(' ');
            }

            if (keyNames.Length != keyValuesArray.Length)
            {
                throw new FolderNameKeyValuesMismatchException(string.Format(Messages.ErrorExtractingKeyValuesFromFolderName, keyValuesArray.Length, keyNames.Length, viewName));
            }

            var pairs = new KeyValuePair <string, string> [keyNames.Length];

            for (int i = 0; i < keyNames.Length; i++)
            {
                pairs[i] = new KeyValuePair <string, string>(keyNames[i], keyValuesArray[i]);
            }

            return(pairs);
        }