Quantcast
Channel: Microsoft Online: SharePoint Online forum
Viewing all articles
Browse latest Browse all 10096

Geting the get_maximumvalue() from a NumberField (SP.FieldNumber) not working (SharePoint Online, SharePoint Hosted APP / Javascript)

$
0
0

Hello,

i´m developing a SharePoint Hosted App in SharePoint Online and wont get/set the max and min value of a number Field. The solution what I found did not work:

        var list: SP.List = mfsctx.HostWeb().get_lists().getById(listId);
        var listFields: SP.FieldCollection = list.get_fields();
        var field: SP.Field = listFields.getByInternalNameOrTitle(internalName);
        var fieldAsNumber = mfsctx.AppContext().castTo(field, SP.FieldNumber);

mfsctx.AppContext().load(fieldAsNumber);

            mfsctx.AppContext().executeQueryAsync(
                successHandler,
                errorHandler
                );

            function successHandler() {

                var b = fieldAsNumber.get_minimumValue();
                var c = fieldAsNumber.get_maximumValue();

I can not compile this on TypeScript. But if I go with the MousePointer over "get_minimumValue();" I can read the Message: 

- "Property get_minimumValue() does not exist on Type Client Object"

- On Microsoft: https://msdn.microsoft.com/en-us/library/office/jj246071.aspx

What take I wrong?


Ralf Happe - Christobal Colón N° 1 ES 07670 Portocolom Tel.: +34 6961 0375 7 @: service@ralfhappe.com Skype: ralfhappe msm: ralfhappe@hotmail.com www.ralfhappe.com ralfhappe | soluciónes



Viewing all articles
Browse latest Browse all 10096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>