Skip to main content
Nintex Community Menu Bar
Question

Required field value missing issue

  • Jul 10, 2024 11:58 AM UTC
  • 7 replies
  • 82 views
  • Translate All

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
  • Jul 10, 2024 12:29 PM UTC

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. 

Translate

Forum|alt.badge.img+6
  • Author
  • Jul 10, 2024 12:29 PM UTC

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

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • Jul 10, 2024 12:29 PM UTC

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…

Translate

Forum|alt.badge.img+6
  • Author
  • Jul 10, 2024 12:30 PM UTC

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





Translate

Forum|alt.badge.img+6
  • Author
  • Jul 10, 2024 12:30 PM UTC

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

Translate

Forum|alt.badge.img+6
  • Author
  • Jul 10, 2024 12:30 PM UTC

Thanks, Its working fine

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • Jul 10, 2024 12:30 PM UTC

Glad you were able to figure it out. 

Translate