Forum Discussion

SMK's avatar
SMK
Qrew Trainee
4 months ago

Button - Formula Url

Hello,

When I click the button "Submit all Sales offices" it is giving me this prompt tbat is showing in the picture 

this is the formula - url code

var text markCompleted = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&apptoken=MyAppToken"
 & "&rid=" & URLEncode([Record ID#]) & "&_fid_921=1" & "&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=er&dfid=34&rid=" & ToText([Record ID#]) & "&page=16"); 

$markCompleted


this form is on edit mode, 

The button will be use to submit all the sales office that are selected(Checkbox) in the embedded report in the form 34 where this button lives. after the selection the use will click the button and submit all the sales selected office. the next step after that is product page where will do a similar process 

1 Reply

  • Can you try this as a formula Rich Text button (ie not a formula URL) and let me know if it works in Edit Mode?  I think it will also work in view mode (but not Add Mode). 

    var text URL = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&apptoken=MyAppToken"
     & "&rid=" & URLEncode([Record ID#]) & "&_fid_921=1" & "&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=er&dfid=34&rid=" & ToText([Record ID#]) & "&page=16"); 

    "<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #1ba802; border-radius: 5px; color: #ffffff; display: inline-block; padding: 0px 0px 0px 0px; width:100px; text-align: center; text-shadow: none; border: 2px solid #1ba802; font-size: 12px \"href='"
    & $URL
    & "'>Submit</a>"