279
Views
3
Comments
Solved
Passing Record Data into Popup Screen

Hi All,


I am wanting to create a link from a table that I have data flowing in from based on the Username and their corresponding Role. I made a popup screen that takes the User_Role record to display/change roles. 


Unfortunately, when I set the OnClick Method for the destination to this popup as 'Navigate' as per usual popup functionality, I get the error: 

"Invalid Button
Arguments of 'Record' data type are not allowed in buttons with 'Method' property set to 'Navigate'."

If I change the OnClick Method to Submit or Ajax, it works, but a persistent error occurs:

"An exception occurred in the client script. Error: Popup link id must be the id of a Link or Button Widget with Method Navigate."

And instead of functioning like a popup, it opens an entirely new screen in the tab. 


How can I work around this? 

2020-09-01 10-42-42
Stefano Valente
Solution

Wow, its a first time see for me :)

But i should say: Passing objects to screens is not recommended. Best is to send the Id and retrieve the record in Preparation.

If you must, you could send the record serialized in text variable.

UserImage.jpg
Cody Zehner

Stefano Valente wrote:

Wow, its a first time see for me :)

But i should say: Passing objects to screens is not recommended. Best is to send the Id and retrieve the record in Preparation.

If you must, you could send the record serialized in text variable.

Glad I have a unique question, always worried about creating duplicate questions :)


I passed in the identifier like so:

SyntaxEditor Code Snippet

GetUser(GetUser_Role(In1).User_Role.User_Id).User.Username

 and it worked! Thank you for the solution!


2020-09-01 10-42-42
Stefano Valente

Glad to help.

Be aware to check your Id exists in the table before calling the GetUser.

I always prefer using aggregates for that reason. 


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.