Can't create Related Fields between two related objects

Posted by Rollbase User on 07-Jan-2013 11:21

This just come out. Old Related Fields are not working and in properties showing as related objects something elce?! 1. I created relationship between two objects - one to many 2. Created a new filed 3. Select "Related Field" 4. "Related Object" does not show related object for what I just created relationship (before it did)

All Replies

Posted by Admin on 07-Jan-2013 12:17

Related fields are only available for N:1 and 1:1 relationships - see Chapter 2 for more info.

Posted by Admin on 12-Jan-2013 01:04

Pavel,



Thank you for your help!

I keep trying to copy field value from one related table to another using -

rbv_api.getRelatedFields



I checked this forum and help file and this is what I come out with

rbv_api.getRelatedFields("R62551360", {!id}, "point_of_entry_in_iraq")



As a result I'm getting something of this nature:

org.mozilla.javascript.NativeJavaArray@710e393c



Please help me to on this.

Posted by Admin on 12-Jan-2013 14:26

What you're getting is JavaScript array. Try something like this:



arr = rbv_api.getRelatedFields("R53815854", {!id}, "fee");

for (var k=0; k

rbv_api.println("Fee="+arr[k]);

Posted by Admin on 12-Jan-2013 14:27

Please see example in Chapter 6.

Posted by Admin on 13-Jan-2013 12:02

Not working, keep getting "null"

I tried everything what I could only imagine - still nothing



by the way, if this two Objects already related can I use rbv_api.println straight,

for example:

rbv_api.println("{!R62551360.description}")



there is only one problem with that, I'm still getting "null"

Is there are something in Objects properties that I need to change?

Posted by Admin on 15-Jan-2013 12:43

Can getRelatedFields pick-up value from Picklist or it need to be only a text field?

Posted by Admin on 15-Jan-2013 13:39

Yes it works just fine (tested). Picklists should return item IDs as values. You can use API getCodeById() later on.

Posted by Admin on 03-Feb-2013 12:32

Pavel,



I'm still trying to copy one related field from one object to another (I have Picklist as a source of values in many to many relationship)

I'm using bellow formula but I'm getting numeric value (field ID) instead of actual value



var poev = rbv_api.getRelatedFields('R62551360', {!id}, 'point_of_entry_in_iraq');

return poev.join(',');

rbv_api.println("poev=");

rbv_api.getCodeById('levy_exemption_request', 'point_of_entry_in_iraq', {!id})





I'm trying to debug this formula:

Posted by Admin on 07-Feb-2013 01:23

Managed to solve this problem by creating template field in related object.



{!R62551360.point_of_entry_in_iraq#value}



I'm curios why this solution was not offered to me earlier?

This thread is closed