Create a formula url to edit a linked child record in a popup window

  • 0
  • 1
  • Question
  • Updated 6 months ago
  • Answered
  • (Edited)
I have a linked child ("related client") to a parent (case). I can easily select a client/add new client using the picker. However, when editing the case and you need to edit the client, the drop picker only allows for selecting a client.  So I want to create a button using a formula-URL field.

I've successfully created button links to add new records utilizing specific forms using the API_GenAddRecordForm but I can't figure out how to do the same with the API_EditRecord call.

Additionally, is there a way to open the link up in a new window (like it does when you add a new record from a drop down picker)?
Photo of Wendy Shoef

Wendy Shoef

  • 680 Points 500 badge 2x thumb

Posted 6 months ago

  • 0
  • 1
I, not understanding your question..

So you are saying One Case has Many Clients.

Can you tell me again what you are trying to do. Are you sitting in the Case Record in Edit mode?
Photo of Wendy Shoef

Wendy Shoef

  • 680 Points 500 badge 2x thumb
I said it incorrectly... the client (parent) has many cases (child), when I am editing a case sometimes I need to edit something in the client record. When you create the relationship, you get the related client and add a client fields. When you are viewing the case, the link to go to the client record is available, but when you are editing a case, only a drop down is available. So I created a new field called "edit client." I would like to use a formula (similar to the API_GenAddRecordForm ) to create a button/link to edit the client record.

Currently, you need to save the case so you can view it, then click on the client link, then click on the edit button. That is obviously a ridiculous process just to edit a record from a related record. Hence why I want to create a button/link to edit the parent(client) directly. 
Photo of Wendy Shoef

Wendy Shoef

  • 680 Points 500 badge 2x thumb
I just figured it out the formula.
URLRoot() & "db/" & [_DBID_CLIENTS] & "?a=er&rid=" & URLEncode ([Related Client]) & "&z=" & Rurl()

Now is there a way to make it open the url in a pop up window instead of just going to the new url?


Ok, so your question is how to make a Hyperlink


This is a formula Rich Text field.


var text Words = "Edit " & [Client name from lookup field]; // these are the words to click on


var text URL = URLRoot() & "db/" & [_DBID_CLIENTS] & "?a=er&rid=" & [Related Client]; // this is the URL to go to
Sorry, need to change to a computer.
(Edited)
Photo of Wendy Shoef

Wendy Shoef

  • 680 Points 500 badge 2x thumb
I got the formula url (as you can see in my post above), I'm now trying to figure out how to open that link in a new window/pop up.
I had to change to a computer from my ipad

var text Words = "Edit " & [Client name from lookup field]; // these are the words to click on

var text URL = URLRoot() & "db/" & [_DBID_CLIENTS] & "?a=er&rid=" & [Related Client]; // this is the URL to go to
"<a href=" & $URL & ">" & $Words & "</a>"
Photo of Wendy Shoef

Wendy Shoef

  • 680 Points 500 badge 2x thumb
You're not understanding my question.

Nevermind, just saw the option to have it open in a new window in the field properties. 

Question is closed.