Jump to content

Traversing objects in merge formulas


 Share

Recommended Posts

I have a question about accessing values with dot syntax. I'm trying to pull in a project field on glentry. I tried this code and it does not work:

{!GLENTRY.PROJECT.BILLABLEEXPDEFAULT!}

I have seen other examples where traversing via dot syntax does work. I would expect it to work whenever the object I am on could only have a reference to one other object. E.g. a ledger entry can only have one project assigned to it. Is this not standard? Is it just trial and error to determine when this syntax is acceptable or note?

Here is what I wanted to do:

if("{!GLENTRY.PROJECT.BILLABLEEXPDEFAULT!}" && "{!GLENTRY.PROJECT.BILLABLEEXPDEFAULT!}" == 1){
  return true;
}else{
  return false;
}

Here is what I had to do:

{!#LOOP_BEGIN.all#project@PROJECTID@=@GLENTRY.PROJECTID(1)!}
  if( "{!project.BILLABLEEXPDEFAULT!}" && "{!project.BILLABLEEXPDEFAULT!}" == "1"){
	return true;
  }
{!#LOOP_END.all!}
return false;

 

Link to comment
Share on other sites

  • Members

With platform triggers and document templates there is currently a limitation of pulling related fields like this. This works with smart events nd smart rules. This is a known limitation with the product leader of the platform application and it is on his roadmap to address.

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...