获取空值而不是空值

时间:2018-11-07 06:56:58

标签: javascript controller salesforce helper

我正在尝试打开一个新表单来调用newRecord函数。此newRecord函数将sObjectId的值设置为 null ,但它是 empty

未获得预期结果(sObjectId == null)。 当前结果(sObjectId ==“”)。

newRecord : function(component, event, helper) {
    component.set('v.body', []);
    component.set('v.rowIndex', 0);
    component.set('v.currentRowIndex', 0);
    component.set('v.objectName', "PlanType__c");
    helper.readRecords(component, event, helper);
    component.set('v.objectName', "ProjectType__c");
    helper.readRecords(component, event, helper);
    component.set('v.objectName', "Project__c");
    component.set('v.fieldSetName', "ProjectGanttTextInGanttBarOption");
    helper.readCustomObjectFieldset(component, event, helper);
    component.set('v.fieldSetName', "ProjectGanttFilterOption");
    helper.readCustomObjectFieldset(component, event, helper);
    component.set('v.fieldSetName', "ProjectGanttSortByOption");
    helper.readCustomObjectFieldset(component, event, helper);
    helper.readCompactLayoutAsFieldSet(component, event, helper);
    component.set('v.objectName', "GanttSettings__c");
    var selectGanttSettings = component.find("select-GanttSettings");
    if($A.util.isUndefinedOrNull(selectGanttSettings.get("v.value")) || $A.util.isEmpty(selectGanttSettings.get("v.value"))){
        component.set("v.sObjectIsDisable", false);
        component.set('v.sObjectId', null);
        component.set('v.sObject', {'Name':'','Global__c':false,'Default__c':false});
    }else{
        component.set('v.sObjectId', selectGanttSettings.get("v.value"));
        helper.readRecord(component, event, helper);
    }
    helper.readCustomField(component, event, helper);
    helper.showModal(component, event, helper);
},

0 个答案:

没有答案