0

VF page is working properly but when I added a namespace, it suddenly showed this Null Exception error. Namespace name is bxc_markup, i prepended this name to the beginning of the controller name as shown on the 2nd line at the top, but its still the same thing. Could you help me find out what else do I need to do to fix the error? Again this only happened when I added namespace. There exception was thrown after the inner class was called.

Error when rendering:

enter image description here

VF:

<apex:page docType="html-5.0" showHeader="false" sidebar="false" standardStylesheets="false" 
       controller="bxc_markup.AnnotatePhotoController" showQuickActionVfHeader="false">
<html lang="en"  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <apex:stylesheet value="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" />
        <apex:stylesheet value="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" />    
        <apex:slds />
    </head>
    <body>
        <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"/>
        <apex:includeScript value="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"/>
        <apex:includeScript value="{!$Resource.photo_sketch_new}"/>
        <script src='/canvas/sdk/js/publisher.js'></script>
        <div id="loading"></div>
        <div>
            <apex:outputPanel id="markUp" layout="block">
            <div>
                <div class="slds-form-element slds-m-around_small slds-p-right_medium slds-p-left_medium slds-p-bottom_medium">
                    <p class="slds-float_left">Target Field</p>
                    <div class="slds-form-element__control">
                        <div class="slds-select_container">
                            <select class="slds-select" style="font-size:1.2rem" value="" id="options" >
                                <option selected="selected" id=""></option>
                                <apex:repeat value="{!strings}" var="type">
                                    <option id="{!type.api}"><span style="font-size: 270%;">{!type.label}</span></option>
                                </apex:repeat>                                                
                            </select>
                        </div>
                    </div>
                </div>
                <div class="slds-form-element slds-m-around_small slds-p-right_medium slds-p-left_medium slds-p-bottom_medium">
                    <p class="slds-float_left">Select File</p>
                    <div class="slds-select_container" >
                        <select class="slds-select" value="{!selectedFile}" id = "optionsFile" onchange="myCanvas.selectFile($('#optionsFile option:selected').attr('id'), event);">
                            <option selected="selected" id=""></option>
                            <apex:repeat value="{!files}" var="type">
                                <option id="{!type.Id}"><span style="font-size: 250%;">{!type.Title}</span></option>
                            </apex:repeat>                                                
                        </select>
                    </div>
                </div>
                <div class="slds-form-element slds-m-around_small slds-p-right_medium slds-p-left_medium slds-p-bottom_medium">
                    <p class="slds-float_left">Description</p>
                    <div class="slds-form-element__control">
                    <textarea rows="3" style="font-size:1.5rem" id="desc" class="slds-input" placeholder=""/>
                    </div>
                </div>
            </div>
                <div class="demo" id="colors_demo">
                    <div id="canvas-container">
                        <div class="slds-grid" style="margin-bottom:15px" >
                            <div class="slds-col">
                                <span class="btn-file" title="Upload/Take Photo">
                                    <img src="/resource/drawingIcons/tab-camera.svg" width="35"/>
                                    <input type="file" id="input" /> 
                                </span>
                            </div>
                            <div class="slds-col" title="Rotate Clockwise">
                                <a role="button" onclick="myCanvas.rotateClockwise();">
                                    <img src="/resource/drawingIcons/tab-rotate.svg" width="35"/>
                                </a>
                            </div>
                           <div class="slds-col" title="Undo">
                                <a role="button" onclick="myCanvas.undo();">
                                    <svg aria-hidden="true" class="slds-icon slds-icon_container_circle slds-icon--large slds-utility-action-undo" style="height: 3.5rem;background: blue;">
                                        <use xlink:href="{!URLFOR($Asset.SLDS, 'assets/icons/utility-sprite/svg/symbols.svg#undo')}"></use>
                                    </svg>
                                </a>
                            </div>
                            <div class="slds-col" title="Pencil">
                                <a role="button" data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
                                    <img src="/resource/drawingIcons/tab-draw.svg" width="35"/>
                                </a>
                            </div>
                            <div class="slds-col" title="Reset">
                                <a role="button" onclick="myCanvas.discard();">
                                    <img src="/resource/drawingIcons/tab-delete.svg" width="35"/>
                                </a>
                            </div>
                            <div class="slds-col" title="Submit Changes">
                                <a role="button" onclick="setImageString('tools_sketch');">
                                    <img src="/resource/drawingIcons/tick.svg" width="36"/>
                                </a>
                            </div>
                        </div>



                            <div class="collapse" id="collapseExample">
                                <div class="row" style="background: #F0F1F2; border:0px; margin-top:40px; ">
                                    <div class="col-xs-2 col-xs-offset-1">
                                        <div class="size " onclick="myCanvas.changeSize(2);" style="height:4px;width:4px;border-radius:2px;"/></div>
                                            <div class="col-xs-2">
                                                <div class="size" onclick="myCanvas.changeSize(4);" style="height:8px;width:8px;border-radius:4px;"/>
                                                </div>
                                                <div class="col-xs-2">
                                                    <div class="size" onclick="myCanvas.changeSize(8);" style="height:14px;width:14px;border-radius:7px;"/>
                                                    </div>
                                                    <div class="col-xs-2">
                                                        <div class="size" onclick="myCanvas.changeSize(16);" style="height:20px;width:20px;border-radius:10px;"/>
                                                        </div>
                                                        <div class="col-xs-2">
                                                            <div class="size" onclick="myCanvas.changeSize(32);" style="height:32px;width:32px;border-radius:16px;"/>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div> 
                            <div id="color_box">
                                <div class="single-color"></div>
                                <div class="colors"></div>
                            </div>
                            <div class="slds-m-vertical_medium"> 
                                <canvas id="tools_sketch" width="400" height="400"></canvas>
                                <!--<canvas id="tools_sketch"></canvas>-->
                            </div>
                        </div>
                        <div class="slds-scope" id="cont">
                            <div style="margin-top: 16rem;">
                                <p style="font-size: large;color: white;">Do you want to take/upload another photo?</p>
                                <button class="slds-button slds-button_brand button" style="font-size: 2rem;" onclick="discard()">Yes</button>
                                <button class="slds-button slds-button_brand button" style="font-size: 2rem;" onclick="refreshFeed()">No</button>
                            </div>
                        </div>
            </apex:outputPanel>
        </div>
            <script type="text/javascript">
             Sfdc.canvas.publisher.subscribe({name: "publisher.showPanel",
                onData:function(e) {
                    Sfdc.canvas.publisher.publish({name:"publisher.setValidForSubmit", payload:"true"});
                }});
             Sfdc.canvas.publisher.subscribe({ name: "publisher.post",
                onData: function(e) {
                    setImageString('tools_sketch');
                }});  
             function setImageString(canvasId){
                var dataURL = document.getElementById(canvasId).toDataURL();
                var base64String = dataURL.replace('data:image/png;base64,', '');
                show('loading', true);
                Visualforce.remoting.timeout = 120000;
                Visualforce.remoting.Manager.invokeAction(
                    '{!$RemoteAction.AnnotatePhotoController.PostToChatterRemote}',
                    base64String,'{!myId}', document.getElementById("desc").value, $('#options option:selected').attr('id'),
                    function(result, event){
                        show('loading', false);
                        $("#cont").show();
                        document.getElementById("desc").value = '';
                        $("html, body").animate({
                            scrollTop: 0
                        }, 600);
                    }, 
                    {escape: true});
            }

            var myCanvas = false;
            var locationOld = window.location.href;
            $(function() {
                myCanvas = new Canvas('tools_sketch');
                myCanvas.setImgInput('input');
                myCanvas.selectFile('optionsFile');

                var theCanvas = document.getElementById('tools_sketch');
                //theCanvas.width = window.innerWidth * 0.7;
                //theCanvas.height = window.innerHeight * 0.5;

                $.each(['#e74c3c', '#c0392b', '#2ecc71', '#1abc9c', '#3498db', '#9b59b6', '#f1c40f', '#f39c12'], function() {
                    $('#colors_demo .colors').append(
                        "<div class='colour' style='background-color: " + this + ";' onclick=\"changeCanvasColour('" + this + "')\"></div>");
                });
                $.each(['#ecf0f1', '#bdc3c7', '#7f8c8d', '#34495e', '#000000', '#ffffff'], function() {
                    $('#colors_demo .single-color').append(
                        "<div class='colour' style='background-color: " + this + ";' onclick=\"changeCanvasColour('" + this + "')\"></div>");
                });

                $(".colour").click(function() {
                    $(".colour").removeClass().addClass('colour');
                    $(this).addClass('colour-active');
                    var currentColour = $(this).css("background-color");
                    $(".size").each(function() {
                        $(this).css("background-color", currentColour);
                    });
                });

                $(".size").click(function() {
                    $(".size").removeClass().addClass('size');
                    $(this).addClass('size-active');
                });

                $("option[id='{!MarkupSelectedField}']").attr('selected','selected');
            });

            function show(id, value) {
                document.getElementById(id).style.display = value ? 'block' : 'none';
            }
            function changeCanvasColour(colour) {
                myCanvas.changeColour(colour);
            }   
            function discard(){
                document.getElementById('cont').style.display = 'none';
                myCanvas.discard();
            }
            function refreshFeed() {
                Sfdc.canvas.publisher.publish({name : 'publisher.refresh',  payload : {feed: true}});
                Sfdc.canvas.publisher.publish({name : 'publisher.close',    payload:{refresh:"true"}});
            }
            function launchFlow(){
                window.location.href = '/flow/Sample_Flow';
            }
        </script>
    </body>
</html>

Apex:

global class AnnotatePhotoController {
public Id myId {get;set;}
public String selectedType{get;set;}
public String selectedFile{get;set;}
public List<ContentVersion> versionFiles{get;set;}
public Flow.Interview.Sample_Flow myFlow {get; set;}

public class FieldSetsWrapper{
    public String label {get;set;}
    public String api {get;set;}    
}

public AnnotatePhotoController()
{
    myId = ApexPages.currentPage().getParameters().get('id'); // get current record ID
    if (myId == null) {
        myId = UserInfo.getUserId(); // set this to be current user ID if no record is associated
    } 
}

@RemoteAction
global static String PostToChatterRemote(String fileContent, Id objId, String description, String field) {
    String errorMsg = null;
    try {
        ContentVersion cont = new ContentVersion();
        cont.Title = string.isBlank(description) ? string.valueOf(datetime.now()) : description;
        cont.VersionData = EncodingUtil.base64Decode(fileContent);
        cont.PathOnClient = '/' + string.valueOf(datetime.now()) + '.png';
        cont.Description = description;
        insert cont;

        ContentVersion cVer = [Select ContentDocumentId, Id, Description From ContentVersion Where Id =: cont.Id];
        ContentDocumentLink docuLink = new ContentDocumentLink();
        docuLink.LinkedEntityId = objId;
        doculink.ContentDocumentId = cVer.ContentDocumentId;
        doculink.ShareType = 'V';
        insert docuLink;

        String queryStr = 'Select ' + field + ' From ' + objId.getSobjectType() + ' Where Id = ' + '\'' + objId + '\'';
        Sobject obj = database.query(queryStr);

        String oldVal = String.valueOf(obj.get(field)) <> null ? (String)obj.get(field) : '';
        String newVal = oldVal + '<p>'+ description + '</p>' + '<p><img src="/sfc/servlet.shepherd/version/download/' + cont.Id + '"></img></p>';
        obj.put(field, newVal);
        update obj;

    } catch(Exception e) {
        errorMsg = e.getMessage();
        System.debug(e.getMessage());
    }
    return errorMsg;
}

public List<FieldSetsWrapper> getStrings() {
    String objName = myId.getSObjectType().getDescribe().getName();
    SObjectType objToken = Schema.getGlobalDescribe().get(objName);
    DescribeSObjectResult objDef = objToken.getDescribe();
    Map<String, Schema.FieldSet> fields = objDef.FieldSets.getMap();
    List<FieldSetsWrapper> targetFieldList = new List<FieldSetsWrapper>();

    for(Schema.FieldSetMember fsMemberOpp: fields.get('markup_target_fields').getFields()){
        FieldSetsWrapper fieldsWrap = new FieldSetsWrapper();
        fieldsWrap.label = fsMemberOpp.getLabel();
        fieldsWrap.api = fsMemberOpp.getFieldPath();

        targetFieldList.add(fieldsWrap);
    }

    return targetFieldList;
}

public List<ContentVersion> getFiles() {
    Set<String> plValues = new Set<String>();
    Set<Id> docIds = new Set<Id>();
    selectedFile = '';

    for(ContentDocumentLink cd: [Select ContentDocumentId From ContentDocumentLink Where LinkedEntityId=: myId]) {
        docIds.add(cd.ContentDocumentId);
    }

    versionFiles = [Select Id, Title From ContentVersion Where ContentDocumentId IN: docIds];
    return versionFiles;
}

public String getMarkupSelectedField() {
  String markupSelectedField = '';
  if (myFlow!=null) {
      markupSelectedField = (String) myFlow.getVariableValue('MarkupSelectedField');
  }

  return markupSelectedField;
}

public Id getMarkupRecordId() {
    Id markupRecordId;
    if (myFlow==null) {
        return ApexPages.currentPage().getParameters().get('id');
    }else {
        markupRecordId = (Id) myFlow.getVariableValue('MarkupRecordId');
    }

    return markupRecordId;
}

public String getPausedId() {
    String currentUser = UserInfo.getUserId();
    String interviewLabel = 'Product_Inspection' + myId;
    List<FlowInterview> interviews = 
        [SELECT Id FROM FlowInterview WHERE CreatedById = :currentUser AND InterviewLabel = :interviewLabel order by LastModifiedDate];

    if (interviews == null || interviews.isEmpty()) {
        return null; // early out
    }

    // Return the ID for the first interview in the list
    return interviews.get(0).Id;
}

public Boolean getShowMarkUp() {
  Boolean showMarkUp=true;
  if (myFlow==null) {
      return false;
  } else {
      showMarkUp = (Boolean) myFlow.getVariableValue('ShowMarkUp');
  }

  return (showMarkUp==null ? false: showMarkUp);
}

public Boolean getShowFlow() {
    Boolean showFlow=true;
    if (myFlow==null) {
        return true;
    }else {
        showFlow = (Boolean) myFlow.getVariableValue('ShowFlow');
    }

    return (showFlow==null ? false: showFlow);
}

}

Debug logs: 39.0 APEX_CODE,FINEST;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,INFO 20:39:45.0 (322792)|USER_INFO|[EXTERNAL]|0057F000000WG6I|anapee90@tscc.com|Pacific Standard Time|GMT-08:00 20:39:45.0 (357147)|EXECUTION_STARTED 20:39:45.0 (360552)|CODE_UNIT_STARTED|[EXTERNAL]|0667F000003Noi0|VF: /apex/bxc_markup__AnnotatePhoto_new 20:39:45.0 (9947183)|SYSTEM_MODE_ENTER|true 20:39:45.0 (10266494)|HEAP_ALLOCATE|[72]|Bytes:3 20:39:45.0 (10308548)|HEAP_ALLOCATE|[77]|Bytes:152 20:39:45.0 (10323168)|HEAP_ALLOCATE|[342]|Bytes:408 20:39:45.0 (10337838)|HEAP_ALLOCATE|[355]|Bytes:408 20:39:45.0 (10351598)|HEAP_ALLOCATE|[467]|Bytes:48 20:39:45.0 (10378980)|HEAP_ALLOCATE|[139]|Bytes:6 20:39:45.0 (10393504)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:16 20:39:45.0 (10398212)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:184 20:39:45.0 (10401461)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:39 20:39:45.0 (10404809)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:2 20:39:45.0 (10413918)|METHOD_ENTRY|1|01p7F000007m6hH|AnnotatePhotoController.AnnotatePhotoController() 20:39:45.0 (10419717)|STATEMENT_EXECUTE|1 20:39:45.0 (10425415)|STATEMENT_EXECUTE|1 20:39:45.0 (10426606)|STATEMENT_EXECUTE|[8] 20:39:45.0 (10430515)|METHOD_EXIT|1|AnnotatePhotoController 20:39:45.0 (17222299)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:24 20:39:45.0 (17249163)|VARIABLE_SCOPE_BEGIN|[13]|this|bxc_markup.AnnotatePhotoController|true|false 20:39:45.0 (17321327)|VARIABLE_ASSIGNMENT|[13]|this|{}|0x19da52ee 20:39:45.0 (17354679)|STATEMENT_EXECUTE|1 20:39:45.0 (17356669)|STATEMENT_EXECUTE|[2] 20:39:45.0 (17374103)|STATEMENT_EXECUTE|[3] 20:39:45.0 (17375979)|STATEMENT_EXECUTE|[4] 20:39:45.0 (17377094)|STATEMENT_EXECUTE|[5] 20:39:45.0 (17378088)|STATEMENT_EXECUTE|[6] 20:39:45.0 (17392102)|HEAP_ALLOCATE|[15]|Bytes:6 20:39:45.0 (17486665)|STATEMENT_EXECUTE|[14] 20:39:45.0 (17489724)|STATEMENT_EXECUTE|[15] 20:39:45.0 (17513748)|HEAP_ALLOCATE|[50]|Bytes:5 20:39:45.0 (17540091)|HEAP_ALLOCATE|[56]|Bytes:5 20:39:45.0 (17553671)|HEAP_ALLOCATE|[64]|Bytes:7 20:39:45.0 (17610350)|ENTERING_MANAGED_PKG| 20:39:45.0 (17692603)|HEAP_ALLOCATE|[15]|Bytes:73 20:39:45.0 (17747579)|HEAP_ALLOCATE|[15]|Bytes:34 20:39:45.0 (17771802)|HEAP_ALLOCATE|[15]|Bytes:2 20:39:45.0 (17786131)|ENTERING_MANAGED_PKG| 20:39:45.0 (17865469)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{}|0x19da52ee 20:39:45.0 (17876277)|VARIABLE_ASSIGNMENT|[EXTERNAL]|value|null 20:39:45.0 (17886856)|VARIABLE_ASSIGNMENT|[2]|this.myId|null|0x19da52ee 20:39:45.0 (17928181)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{}|0x19da52ee 20:39:45.0 (17941208)|STATEMENT_EXECUTE|[16] 20:39:45.0 (17942567)|STATEMENT_EXECUTE|[17] 20:39:45.0 (18014327)|HEAP_ALLOCATE|[17]|Bytes:85 20:39:45.0 (18027396)|SYSTEM_METHOD_ENTRY|1|UserInfo.UserInfo() 20:39:45.0 (18030883)|STATEMENT_EXECUTE|1 20:39:45.0 (18037456)|SYSTEM_METHOD_EXIT|1|UserInfo 20:39:45.0 (18047052)|METHOD_ENTRY|[17]||System.UserInfo.getUserId() 20:39:45.0 (18086472)|METHOD_EXIT|[17]||System.UserInfo.getUserId() 20:39:45.0 (18095103)|HEAP_ALLOCATE|[17]|Bytes:4 20:39:45.0 (18118094)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{}|0x19da52ee 20:39:45.0 (18293774)|VARIABLE_ASSIGNMENT|[EXTERNAL]|value|"0057F000000WG6IQAW" 20:39:45.0 (18389017)|VARIABLE_ASSIGNMENT|[2]|this.myId|"0057F000000WG6IQAW"|0x19da52ee 20:39:45.0 (18496275)|SYSTEM_MODE_ENTER|true 20:39:45.0 (18553957)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:24 20:39:45.0 (18569209)|VARIABLE_SCOPE_BEGIN|[54]|this|bxc_markup.AnnotatePhotoController|true|false 20:39:45.0 (18687336)|VARIABLE_ASSIGNMENT|[54]|this|{"myId":"0057F000000WG6IQAW"}|0x19da52ee 20:39:45.0 (18699810)|STATEMENT_EXECUTE|[54] 20:39:45.0 (18701291)|STATEMENT_EXECUTE|[55] 20:39:45.0 (18793943)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"myId":"0057F000000WG6IQAW"}|0x19da52ee 20:39:45.0 (18833046)|ENTERING_MANAGED_PKG| 20:39:45.0 (19011754)|HEAP_ALLOCATE|[55]|Bytes:4 20:39:45.0 (19045145)|HEAP_ALLOCATE|[55]|Bytes:4 20:39:45.0 (19051004)|VARIABLE_SCOPE_BEGIN|[55]|objName|String|false|false 20:39:45.0 (19062569)|VARIABLE_ASSIGNMENT|[55]|objName|"User" 20:39:45.0 (19067113)|STATEMENT_EXECUTE|[56] 20:39:45.0 (19085400)|ENTERING_MANAGED_PKG| 20:39:45.0 (38048683)|HEAP_ALLOCATE|[56]|Bytes:1328 20:39:45.0 (38103347)|ENTERING_MANAGED_PKG| 20:39:45.0 (38127662)|VARIABLE_SCOPE_BEGIN|[56]|objToken|Schema.SObjectType|true|false 20:39:45.0 (38279708)|VARIABLE_ASSIGNMENT|[56]|objToken|"common.apex.runtime.impl.ApexSObjectTypeToken@2a8d5e55"|0x2a8d5e55 20:39:45.0 (38291021)|STATEMENT_EXECUTE|[57] 20:39:45.0 (38354493)|HEAP_ALLOCATE|[57]|Bytes:4 20:39:45.0 (38394594)|VARIABLE_SCOPE_BEGIN|[57]|objDef|Schema.DescribeSObjectResult|true|false 20:39:45.0 (38476578)|VARIABLE_ASSIGNMENT|[57]|objDef|"common.api.soap.wsdl.DescribeSObjectResult@1b46225b"|0x4e0e2f0a 20:39:45.0 (38485358)|STATEMENT_EXECUTE|[58] 20:39:45.0 (39275967)|HEAP_ALLOCATE|[58]|Bytes:4 20:39:45.0 (39294008)|VARIABLE_SCOPE_BEGIN|[58]|fields|Map|true|false 20:39:45.0 (39371217)|VARIABLE_ASSIGNMENT|[58]|fields|"{}"|0x63902524 20:39:45.0 (39380088)|STATEMENT_EXECUTE|[59] 20:39:45.0 (39473522)|HEAP_ALLOCATE|[59]|Bytes:4 20:39:45.0 (39537870)|ENTERING_MANAGED_PKG| 20:39:45.0 (39560719)|VARIABLE_SCOPE_BEGIN|[59]|targetFieldList|List|true|false 20:39:45.0 (39585039)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4 20:39:45.0 (39597282)|VARIABLE_ASSIGNMENT|[59]|targetFieldList|[]|0x5c7a199 20:39:45.0 (39608654)|HEAP_ALLOCATE|[61]|Bytes:20 20:39:45.0 (39646472)|ENTERING_MANAGED_PKG| 20:39:45.0 (39731972)|HEAP_ALLOCATE|[61]|Bytes:41 20:39:45.0 (39969363)|FATAL_ERROR|System.NullPointerException: Attempt to de-reference a null object

Class.bxc_markup.AnnotatePhotoController.getStrings: line 61, column 1

  • can you include a debug of the error that you're receiving when the page loads - does the log give a more detailed error ? It would be helpful to see the error that you are receiving. – Ronnie Jan 18 '18 at 4:36
  • I added the debug logs. I'm am not that deep in VF so maybe i struggle with this one. – Jefferson Fernandez Jan 18 '18 at 4:57
  • 1
    Most likely because you need to add the namespace to the get where you use markup_target_fields. You should always ensure a key exists before dereferencing. Debug the fields map to see what they keys are to help – Eric Jan 18 '18 at 5:06
  • The problem doesn't appear to be your VF page - but more appears to be in your controller - you should be sure that the values that you are using are existing here - such as "myId" -> does your page contain these parameters - do you have it at the time that getStrings is called? if not - every call after that where you try to reference something from Schema.getDescribe() you likely will be getting null reference here - be sure that you have a describeResult before trying to access methods of the describe result – Ronnie Jan 18 '18 at 5:36
0

Thanks for the comments!!!

I found out that of course, when namespace changes, it adds to the API name of the field set so I referenced the new API name of the fieldset now with the namespace prepended.

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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