rbf_getRelatedFields not returning a value - Forum - Rollbase - Progress Community

rbf_getRelatedFields not returning a value


rbf_getRelatedFields not returning a value

This question is not answered


I am trying to use retrieve a value of my field for a relationship and I have used this function rbf_getRelatedFields in the following way given below. However I am getting an error: Data Object with id 0 not found. Any suggestions on where I am going wrong?

rbf_getRelatedFields("R112536491", {!id}, "account_type",
function(relName, objId, values)
var account_type;
account_type = values[0];

All Replies
  • What is value of {!id} token you're using?

  • Do I need to specify a value? Can I not use {!id} or just id in that as an argument?

  • Template parser will set value for you if available (for instance, on record View page). But, since you're facing error, the question still stands. Please check HTML code on your page to find out why you're having an error.

  • Any suggestions on how do I go about setting up a template parser because the help documentation does not really give any examples.

  • First, what is type of the page you're using? Page Editor > Page properties > Page type

  • The Page Type is "New"

  • Also, please make sure that {!id} token you're using is listed in helper UI which is available to you when you type your code in Rollbase.

  • Yes it is available.

  • On "New" page there is no record in scope, so there is no valid value for {!id} toke.

    Basically, the system does not know which record you're referring to.

  • Because it is a related field whose value I am interested in from my parent Object i.e. Parent Object: Account, child Object: Third Party Application. So I'd like to access the value of a field from my parents Object which in this case is Account. I understand there is no "third party application" in scope which is why there is no valid id but I have an account object available to me from which I am interested in retrieving the field value.

  • You need to use different technique: client-side JavaScript. You cannot use server-side template tokens on "New" page.

  • But rbf_getRelatedFields is client-side Javascript and not server-side.

  • Can you make it in one line from your rbf_getRelatedFields ..... to function(relName, objId, values)

    also can try to see the console(F12) if there are any errors?



  • Just do not use {!id} toke. Use client-side rbf_getFieldValue() instead.

  • and what should integration name should I use in getFieldValue? The account's field's integration name?