Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, September 28, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Client (Pre-7.2)
Forum to discuss using & developing the legacy SalesLogix Web Client (For versions 7.0 and earlier). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Client (Pre-7.2) | New ThreadView:  Search:  
 Author  Thread: Call slx web Action from javascript function
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Call slx web Action from javascript functionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Jan 07 3:19 PM
fiogf49gjkf0d
Is it possible to call an slx action from a javascript function? I have appended the add contact to assign to popup a window to assign a role. The code is at the bottom of post. I have modified the template 'oppaddconsrchret'. This page is never visible to the end user. I added the popup window to allow the user to chose a contact role. I added the contact role alias to the hidden fields and it works great. Now I have a custom table I must create a record in at the same time. I tried adding aliases to the hidden fields, but the insert doesn't happen.

I am thinking I may need to code the insert which I am ok with. Also wondering if I could just put the action in the body of the html, or maybe call it from javascript. I am setting my oppid in the init() function, copying what slx did. Better yet perhaps I am doing something wrong with the hidden fields to cause the update to fail. Any advice appreciated. thanks



<script language="Javascript">

</script>


<form name="mainform" action="<#SYSTEMFIELD name=swcpath>/action?name=oppaddcon" method="POST">
<input type="hidden" name="oppconconid" value="<#F name=conid>" />
<input type="hidden" name="oppcontitle" value="<#F name=contitle>" />
<input type="hidden" name="oppconpri" value="<#F name=conprimary>" />
<input type="hidden" name="nextpage" value="closedlg" />
<input type="hidden" name="oppconoppid" value="" />
<input type="hidden" name="conaccid" value="<#F name=conaccid>" />
<input type="hidden" name="conrole" value="" />
<input type="hidden" name="c_acct_ass_accountid" value="<#F name=conaccid>" />
<input type="hidden" name="c_acct_ass_contactid" value="<#F name=conid>" />
<input type="hidden" name="c_acct_ass_oppid" value="" />
</form>


[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Call slx web Action from javascript functionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 07 3:00 AM
fiogf49gjkf0d
Yes:

<#INCLUDE type=action name=actionname>

within the action you can use RequestGetValue("postedvariablename") to pick up values posted to the screen....

You can put the action anywhere on your page - just be aware that the action will run before the page has even loaded (ie the rest of the page will wait until the action has finished processing.)
[Reply][Quote]
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Re: Call slx web Action from javascript functionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 07 8:54 AM
fiogf49gjkf0d
Thanks Nick. I had ended up trying it in the body of the page and worked great. Thanks for the further info - I wasn't sure when if fired - inline or before/during page load as you indicate.
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Call slx web Action from javascript functionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 07 9:00 AM
fiogf49gjkf0d
No worries FYI any <#> fields in templates are all server side (equivalent of ASP % tags), so will run before the page loads..
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 9/28/2024 6:23:08 PM