Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Change number of selections in cross-reference

ScottNess1
Contributor III

Is it possible to have a custom object, or some other solution, that will change the value for Maximum Selections in a cross reference field?  

For example, XREF field is set to 'No Maximum', then a VL field with values 'Single'; 'Multi'. 

If the VL field equals 'Single' limit the end user to select only one value from the XREF.

Or another possible option is display an error message if more then one value is select in the XREF and not allow user to save until only one value is selected?

TIA

1 ACCEPTED SOLUTION

Accepted Solutions

Because calculated field will validate number of the records only AFTER save, this definitely will not prevent user to have invalid number of records in CR.

But as this is intended, you can show up Text banner in such a case, so that after save or upon next record opening, user will be aware of invalid setting.

To do so you do not need any custom code, but plans DDE to hide/show text banner based on Yes/No calculation.

 

Kindest regards, I remain,

Ilya

View solution in original post

5 REPLIES 5

Ilya_Khen
Champion III

Scott Ness,

 

You cannot change the field max option, but you can perform check during the records save for example.

David Petty provided some examples on how to work with CR:

custom object for cross reference field 

Ilya Khen‌,

Thanks for the response.  I had looked at that post, but did not find anything that seemed to be relevant for my use case.

Yep, I do not think we have in a community something closer to your use case, but David showed the way to access CR field, which you may utilize to some degree to count number of records in CR.

Ilya Khen

Since I have not been successful with the XREF field, I'm trying an approach with a calculated VL.  The formula completes the validation on the number of selections, and is either a Yes or No value.  

With this, all I want is to display a message box to end user when they save the record and the value equals Yes.  Additionally, the message can be displayed when a user opens a record that has a value of Yes for this field.

This will not stop the user from saving the record, or continuing to make additional edits.

Is this possible?  If so, will appreciate any specifics on the code.

TIA

Because calculated field will validate number of the records only AFTER save, this definitely will not prevent user to have invalid number of records in CR.

But as this is intended, you can show up Text banner in such a case, so that after save or upon next record opening, user will be aware of invalid setting.

To do so you do not need any custom code, but plans DDE to hide/show text banner based on Yes/No calculation.

 

Kindest regards, I remain,

Ilya