Skip to main content

Notifications

How to get Lookup record in caller form when you click on view details form.

GirishS Profile Picture GirishS 27,832 Super User 2024 Season 1

Hi All,

In this blog I will give you a piece of code for getting lookup value when the view details button is clicked from form.

Sometimes the view details wont filter for the selected record and it will show all the records in the form.

To overcome this issue, you can get the caller lookup value and set the range to the DataSource of the form.

Below is the code.

Public class FormName extends FormRun
{
    Str lookupFieldValueName;
    public void init()
    {
       lookupFieldValueName = element.args().lookupValue();
    }
    
    class DataSourceName
    {
        public void executeQuery()
        {
            if(lookupFieldValueName != "")
            {
                // add range to the field.
            }
        }
    }
}

Thanks.

Comments

*This post is locked for comments