Required field value missing issue

RajRaj
edited September 1, 2016 in Questions
In my skuid application page, i have a required field in object that comes under managed package. with out giving any values when i click on save button, its not showing any error message like "Required field value is missing". how to achieve this error message using field render or any idea.

Comments

  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    Does the managed package make the field required at the database level, or are they using login within a VF page to indiciate that values are missing.  Hopefully not the latter. 

    If the latter, you might be able to add some validation rules in Salesforce or even write some javascript in Skuid to detect the blank and publish an error message. 
  • RajRaj
    edited March 1, 2016
    Thanks rob. Can u give some sample data, how to write validations in skuid
  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    I think Raymond pointed you to a post where a snippet showed a custom error message:  Here it is again. https://community.skuidify.com/skuid/topics/display-error-message-using-a-skuid-snippet-editor-undef...
  • RajRaj
    edited March 2, 2016
    Rob, i am getting an error while displaying error message in my snippet.

    var editor = pageTitle.data('object').editor;" sections gives an error message like"TypeError: pageTitle.data(...) is undefined"

    I have given Unique id key from
    :  Page Title -> Advance -> Unique Id
    Snippet:


    var $ = skuid.$;
    var pageTitle = $('New Application');
    var editor = pageTitle.data('sk-20m1DL-160').editor;
    var colmodel = skuid.model.getModel('Collateral');
    var col = colmodel.getFirstRow();

    if (col.clcommon__Collateral_Name__c === '' && col.clcommon__Collateral_Name__c === null) {

        editor.handleMessages(
            [{
                message: 'Please Enter Collateral name',
                severity: 'ERROR'
            }]
        );

        return false;
    }

    Another way i have written, but getting same error

    var $ = skuid.$;
    var pageTitle = $('sk-20m1DL-160');
    var editor = pageTitle.data('clcommon__Collateral__c').editor;
    var colmodel = skuid.model.getModel('Collateral');
    var col = colmodel.getFirstRow();

    if (col.clcommon__Collateral_Name__c === '' && col.clcommon__Collateral_Name__c === null) {

        editor.handleMessages(
            [{
                message: 'Please Enter Collateral name',
                severity: 'ERROR'
            }]
        );

        return false;
    }





  • RajRaj
    edited March 2, 2016
    Hi Rob, Now that exception is solved with this snippet. but it is not displaying any error message when i click on save button without enter any data.


    var $ = skuid.$;
    var pageTitle = $('#sk-20m1DL-160');
    var editor = pageTitle.data('object').editor;
    var colmodel = skuid.model.getModel('Collateral');
    var col = colmodel.getFirstRow();

    if (col.clcommon__Collateral_Name__c === '' || col.clcommon__Collateral_Name__c === null) {

        editor.handleMessages(
            [{
                message: 'Please Enter Collateral name',
                severity: 'ERROR'
            }]
        );

        return false;
    }

  • RajRaj
    edited March 2, 2016
    Thanks, Its working fine
  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    Glad you were able to figure it out. 
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!