Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

custom object for cross reference field

ilhankurt
Contributor III

Hi all,

I wantted to set cross reference field with custom object?

Is it possible to do it

 

Regards

31 REPLIES 31

Hi David,

I have a problem for custom object.

 

For other cross reference field on the same application. which contains the custom object.

 

I select a value from the record lookup after click the Ok button it doesnot set the value . I have this trouble for cross reference field which I didnot use on custom object.

 

Regards

ilhan, I don't understand what you're asking.  Are you saying when you click the Lookup link for a cross-reference field and select a record that record isn't being displayed in the cross-reference grid?

 Advisory Consultant

I mean.

 

we create a custom object and we use the cross reference field in js.

till here everything Works fine when I edit record the js in custom object Works.

 

but ı have  anorthor cross reference fields on the same application.there is no relationship between custom object.

I had problem for them. I select a value from the record lookup and  after click the Ok button it doesnot set the value for cross reference field. I think the custom object effects badly other cross reference fields.

David will this custom object work for Version 6.2? I need custom object for Cross reference field where as long as list of countries will display, there I want to rename the one of country name from India to IND. This cross reference field I am using one of questionnaire.

Please help me if you have any sample code. 

Divya this custom object set's a cross-reference field to a particular record.

 

As I stated in the other thread that you're requirements are a little specific and I don't currently have any sample code that fits your needs.

 Advisory Consultant

Hi David,

Can you please let me know how to get cross reference field value using custom code. I am using 6.4 version the value in the looks as "master_DefaultContent_rts_ts5601_s5604_f20634c" in view source. i tried below options

ArcherTech.UI.GenericContent.GetInstance().getFieldValue(20634);

"master$DefaultContent$rts$s" + $CM._fields[20634].sectionId + "$f" + 20634;

Ravibabu, the getFieldValue is very limited on what field type values are returned.

 

For getting the values of a cross-reference field use:

$('input[name*="SelectedValues20634"].val();

It will return all the content id for the linked records.

 Advisory Consultant

Hi David,

tried this $('input[name*="SelectedValues23934"].val(); in 6.7.4 to get the value of a cross-reference field and nothing is happening.  any idea?

Make sure you're calling that line within the System.Application.add_load(function() { });

 Advisory Consultant

I am see below

 

 <script type="text/javascript">


Sys.Application.add_load(function() {


 $('#master_btnApply1').clone().attr('id', 'master_customBtnApply').insertBefore('#master_btnApply1');
 $('#master_btnApply1').hide();
 $('#master_customBtnApply').unbind('click').prop("onclick", null).click(function(){ OnClickSave();return false;});

 $('#master_btnSave1').clone().attr('id', 'master_customBtnSave').insertBefore('#master_btnApply1');
 $('#master_btnSave1').hide();
 $('#master_customBtnSave').unbind('click').prop("onclick", null).click(function(){ OnClickSaveClose();return false;});

    function OnClickSave() {
  
  alert($('input[name*="SelectedValues23934"].val());
    return $('#master_btnApply1').click();
 }

    function OnClickSaveClose() {
  
  return $('#master_btnSave1').click();  
 }

  
});    
</script>