Skip to main content
Nintex Community Menu Bar
Question

Required field value missing issue

  • July 10, 2024
  • 7 replies
  • 48 views

Forum|alt.badge.img+6

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.

This topic has been closed for replies.

7 replies

Forum|alt.badge.img+17
  • Nintex Employee
  • July 10, 2024

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. 


Forum|alt.badge.img+6
  • Author
  • July 10, 2024

Thanks rob. Can u give some sample data, how to write validations in skuid


Forum|alt.badge.img+17
  • Nintex Employee
  • July 10, 2024

I think Raymond pointed you to a post where a snippet showed a custom error message:  Here it is again. https://community.skuid.com/t/display-error-message-using-a-skuid-snippet-editor-undef…


Forum|alt.badge.img+6
  • Author
  • July 10, 2024

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;
}






Forum|alt.badge.img+6
  • Author
  • July 10, 2024

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;
}


Forum|alt.badge.img+6
  • Author
  • July 10, 2024

Thanks, Its working fine


Forum|alt.badge.img+17
  • Nintex Employee
  • July 10, 2024

Glad you were able to figure it out.