Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute:

The column name is "Dialog Box". I tried this

                var context = new SP.ClientContext.get_current();
                var targetList = context.get_web().get_lists().getByTitle("myList");
                var targetListItem = targetList.getItemById(_spGetQueryParam('id'));
                context.load(targetListItem, "Dialog Box");
                context.executeQueryAsync(Function.createDelegate(this, onStatusQuerySucceeded), Function.createDelegate(this, onStatusQueryFailed));

                function onStatusQuerySucceeded() {

                    alert(targetListItem.get_item("Dialog Box"));
                }

                function onStatusQueryFailed(sender, args) {
                    alert("failed Dialog Box");                                            
                }
share|improve this question
up vote 1 down vote accepted

"Dialog Box" is title, you should try with internal name. You can use SharePoint manager to get internal name of column. But to make sure create new column without space and with non existing name and try to get value. Column name without space have same internal name if its not exist.

share|improve this answer
    
I tried with another column named "Status" and it succeeded. So you are right it might be the space. How do you get the internal name ? Please, describe. – Dien Jun 2 at 14:26
1  
You can use SharePoint Manager tool that you can download. In Sharepoint Manager you can navigate to list where you added column.Inside list navigate to fields. Open field and there you can see all property of field. – Amit Jun 2 at 16:44
1  
OR you can also try with give x0020 for each space. In Your case try with Dialog_x0020_Box. This is how internal name is generated.But I am not very sure for this solution. – Amit Jun 2 at 16:49
    
It worked for Dialog_x0020_Box. – Dien Jun 2 at 22:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.