Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, May 7, 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: newbie needs help disabling controls
Tom Foster
Posts: 22
 
newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Apr 08 12:14 PM
hello,

Let me start off by saying that I have never heard of Saleslogix until yesterday, that is how new I am. Ive been tasked to modify the Accounts Details page. I've successfully added the new columns requested but I am not sure how to go about disableing all the controls on the page for non-admin users. I'm only working with the web product and I am a .Net developer. I would like to use a class as described in http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=70 but I am not sure how to go about this. What do I call the file? Should I treat it as an .asp page and include it in the Accounts page? Where should I store the file? I know how to do this using only .Net but I'm not sure how to impliment this in the SalesLogix environment.

Thanks,
Tom
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Apr 08 3:44 PM
Tom,

I want to verify the version of the web client you're using. It makes a huge difference in how the customization you need would be done. Since you're posting in the "pre-7.2" forum, I'm assuming it's 6.x or 7.0 (but not 7.2). I can answer what you're asking for any version prior to 7.2 (I don't know much about 7.2+), but want to make sure that it's for the right version before I answer. It'll take some time to answer with detailed steps. It's not hard to do, but writing it all will take a few minutes and I'd rather not if it's not for the version. Call me lazy, but...

Jeff
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Apr 08 3:46 PM
Tom,

One other thing - the article you referenced won't work in the web client - only the LAN client.

Jeff
[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Apr 08 9:49 AM
Jeff,

thanks for the reply. We are using version 7.0. I appreciate any support you can give.

Thanks,
Tom
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Apr 08 11:29 AM
Tom,

First, when you say the account details, I'm going to assume you mean the main account page - there's also an account details tab. Either way the principles are the same.

The way you can make it read-only for certain users is to create a second, read-only copy of a template and use overrides to ensure that certain user(s) or teams get the correct version (either read-write or read-only) of the template.

Either way, start by opening the SalesLogix web manager which should default to the templates view. Right click in the list of templates and select "Current Package". A popup menu should open and you'll see a list of the packages that exist. (A package is group of customizations.) If you don't have one for your company (or your customer) select "New" and create one naming as you see fit. Otherwise select the one for your company. Whatever you do, don't modify templates (or actions, aliases or queries) one in the base package or any other out of the box package.

Next, in the "filter" box at the top right, type "accinfo". That is the template you need to modify. As an aside, you can always find the name of the template by choosing view source on the web page (make sure you view source on the correct frame) and looking at the top - there should be something that says . Right click on the "accinfo" template that is active (only one can be active at a time) and select "copy". That will copy it into your newly created package. Next, right click on the template that was just copied and select "Properties". Change the name to "accinfo_ro" (or other name to indicate this is the read-only template). Then select the HTML file (use the little folder icon at the end of the HTML File line) and rename the templage to accinfo_ro.htm. You can make it active by right-clicking it and selecting "Activate". You now have a template you can work with and change.

You mentioned being a .NET developer. If you're an ASP.NET developer, the HTML/javascript should come fairly easily. You can do one of two things: add a "readonly" attribute to each HTML control or a disabled property to each HTML tag. The other option is to remove the input controls completely and replace it with a span tag with the class "inactiveTextBox" and within the span tag put a custom SalesLogix #FIELD tag that displays the data. Here's an example from the contact detail view, coninfo:

< span class="inactiveTextBox" style="width:280px;" id="theaccname"><#FIELD name=conacc>< /span>


The #FIELD tag is a custom SalesLogix tag that represents the contact account name in SalesLogix. The "name=conacc" refers to the alias (see aliases in web manager) named "conacc". It's processed server side when the page is generated and replaces the custom #FIELD tag with the actual data. SalesLogix knows which record to use based on the

<#AF name=id>


in the URL. I can go into explaining that in more detail if needed, but for this to work you don't need to worry about that so I think I can skip it.

Once you've made all the changes (either adding disabled/readonly properties to each element or replacing the inputs with , you need to set up an override. You do this in web manager.

From the edit menu, select "Overrides". That will open a dialog box. Make sure that in the "Item" box, the dropdown says "template". (That's the default). In the override drop down, select "accinfo_ro" (or whatever name you chose). In the "User/Team" box, select the user(s) or teams that should see the read only template. Lastly, in the "template" box, select the template that is being overridden - in this case "accinfo". Then click "Set". The record should now show up in the grid below. Click "OK".

With SalesLogix, you have to shutdown and/or flush the web DLL to get it to read the updated version any time you make a change. And actually, with overrides, you're probably better of doing an iisreset. If you want to try the shutdown and flush (if you can, do an iisreset instead - the shutdown/flush didn't work for me), log in to SLX as administrator and open a new browser window and do this:

http://server:port/scripts/slxweb.dll/admin?command=flush
http://server:port/scripts/slxweb.dll/admin?command=shutdown


Now, log in as a user that should get the read only template and see if when you go to the account detail you get the read only version. Also, as an aside, there is a "cacheoff" command that turns off caching, removing the need to constantly shutdown and flush. I wouldn't turn caching off in prod - it will really slow things down, but it's handy in dev. The cacheon and cacheoff commands are:

http://server:port/scripts/slxweb.dll/admin?command=cacheoff
http://server:port/scripts/slxweb.dll/admin?command=cacheon


I know this sounds like a lot, and it probably is, but it's not that hard. It's the gotcha's that take the time. Let me know if some (or none) of this makes sense or you get stuck and I will reply when I can. A lot of my free time that I thought I'd have today dried up yesterday, but I'll help when I can!

Jeff
[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Apr 08 11:52 AM
Wow! that looks like a solution. I'll get on it and let you know how it works out. I can't tell you how much I appreciate your help.

Thanks,
Tom
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Apr 08 11:57 AM
No problem. I've experienced the same "oh, crap, how do I do this" feeling a LOT recently with MS CRM customization and I know how helpful it's been to find an answer that really helps.

The old SalesLogix web client is one area that I can contribute and give back to others for the help I've received in other areas. Hopefully my answer helps you - I tried to include details that aren't always obvious but are good to know.

Jeff
[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Apr 08 2:49 PM
Jeff,

It worked like a charm!!! Well almost. I've got everything working for text boxes using the

<td><span class="inactiveTextBox"><#FIELD name=accmgr></span></td>


approach. This works fine for textboxes but how do I deal with other items such as pick lists and checkboxes? The Address is also another problem for me my current address code looks like this

<tr>
<td valign="top">
<div id="addrinfo" style="width:170;height=55;" onclick="changeAddress();" contenteditable="true" onkeypress="changeAddress();">&nbsp;</div></td>
<input type="hidden" name="accadd1" value="<#F name=accadd1>" />
<input type="hidden" name="accadd2" value="<#F name=accadd2>" />
<input type="hidden" name="acccity" value="<#F name=acccity>" />
<input type="hidden" name="accstate" value="<#F name=accstate>" />
<input type="hidden" name="acczip" value="<#F name=acczip>" />
<input type="hidden" name="accctry" value="<#F name=accctry>" />
</td>
</tr>


How do I go about making that
readonly? The Overrides are working as expected.

Thanks again for the complete and accurate post.

Tom
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Apr 08 8:52 PM
Tom,

Sorry I didn't reply sooner - I was driving back from Vegas today after a fun weekend!

On a select control, since it's generated with a #PICKLIST tag, you can do this:

<#PICKLIST list="listName" name="myList" id="myList" disabled>


Essentially you put the disabled property right in the custom SLX tag. You can do that for any other HTML properties as well such as:

<#PICKLIST list="listName" name="myList" id="myList" disabled style="width:250px;">

or
<#PICKLIST list="listName" name="myList" id="myList" disabled onclick="javascript:myEvent();">


The web DLL will pass the unknown parameters on any custom SLX tag as a part of the generated HTML without doing anything to them. The only exception to that rule is the #DATEPICKER tag. It has it's own method of assigning the event handlers.

For the checkboxes, you should be able to add a "disabled" or "readonly" property to them, too.

As for the address, I believe setting the "contenteditable" to "false", and removing the javascript "onclick=changeAddress()" event should work.

Hopefully that'll take care of it.

Jeff
[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Apr 08 10:23 PM
Well if you're a gambler I hope you won big!!! Thanks for reply. Your answers were common sense but I wasn't sure if I was going to break anything.

Thanks again,
Tom
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Apr 08 11:04 AM
Not a huge gambler...but playing craps, I turned $60 into $120 on Saturday and $100 into $200 on Sunday. The wife didn't fare as well, but we still came home $250 ahead. The key? We had fun and met my best man & his wife who were on their first vacation without the kids, so it was a good trip. I'm wishing I was back in Vegas....

Nope...no tricks on the disabling those controls. Of course, none of that was documented back in the day and I don't know if it is now, but it was a nice find when I learned that stuff. When I worked at Sage I was in constant contact with the tech pubs team on suggestions, improvements & corrections. I've noticed they have really gotten much better at documentation over the years. Tech writing is *not* an easy thing to do!

Let me know if you run into more questions or issues. Glad I could help out.

Jeff
[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Apr 08 1:20 PM
Jeff,

One more question, let me know if I should start a new thread on this. When creating a new contact I need to make sure that certain fields are completed before inserting. I know how to do this using javascript but I was wondering if there was a different or more preferred approach.

Thanks,
Tom
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Apr 08 4:44 PM
Tom,

If you're talking about validating when the user presses save, then you are correct, JS is the way to go. As with any web development just make sure that you validate server side as well. Hopefully in an SLX implementation you can trust your users more than the general public, but I don't like to take those chances. When I do my server side validation and it fails, I usually just use the generic SLX "senderror" function. In the web action, put a like like this:

SendError "Your error message here"


That will send the user to an error page that says "We apologize for the incovenience...Your error message here." Since it should almost never happen that the server side validation fails (unless your users are trying to hack around things), I don't get too worried that they users will see the ugly message. SalesLogix web 7.0 and prior leaves a lot to be desired - including error handling.

Are you good on how to handle the server side updates with the web actions? Basically, it's Cypress Enable, which is a VB Script style language with some custom stuff. You can copy an action into a custom package in the same way you copied the templates so you don't modify the base/standard actions. From there, it's script away!

Jeff
[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Apr 08 9:25 PM
ok Jeff I need help again. I got the client side JS working no problem and in .Net the server side validation is pretty straight forward but you lost me with the "Cypress Enable" part. I did some research and I found that it is a scripting language and it it is even close to VB Script I can pick it up quickly. How do I setup these "Actions" and what is a good generic one to copy over? I'm comfortable "Scripting Away" as you put it, I just need a nudge.

I can't tell you how much I appreciate the help.

Thanks,
Tom
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Apr 08 11:51 AM
Tom,

If you find the <form> tag on on the template (I believe you're working on accinfo), you'll see something like this (it's from a 6.2.6 install, so it might be different, but close):

<form name="mainform" action="<#SYSTEMFIELD name=swcpath>/action?name=updateaccount" method="POST">


The #SYSTEMFIELD tag tells the SLX web DLL "find the path to the web dll" and the "action?name=updateaccount" part tells the DLL web action to execute. In this case, it's named "updateaccount". If you open web manager and click "Actions" on the leftnav, you can search for "updateaccount". You can copy it into a custom package the way you did the template. That way you don't change the base functionality.

Once there is where you do the scripting. A few of the API's you might use:

1) PostedGetValue "ValueName" - gets the value of a control on the form with the name "ValueName"

2) RequestGetValue "ValueName" - pulls a value out of the querystring. If you dynamically build the action property on the form tag, you can append values the way you would in .NET and the RequestGetValue will pull it out for you.

3) SessionSetValue - sets a value in the users session on the server

4) DoUpdate - The call to it is already in the action, but the codes is in an action called "global". It basically takes all the values from the form and updates them to the specified table. Be forewarned that if you add fields, your alias name that represents the field *must* start on the table specified in the "DoUpdate" table and the alias name must also match the control name (not id) property. If you do that, it *should* automatically include any custom fields in the call to "DoUpdate". If you trace the code on the DoUpdate statement, it calls some other functions in the global library. Also, don't put underscores in an alias name if you need to create one - I won't go into why, but trust me, it took me a year to figure it out why updates didn't work, but that was it. I walked over to the developers when I worked at Sage and they couldn't even tell me why.

There is probably more, but it'd probably be easier to answer specific questions than brain dump more than I have.

No problem - you have my sympathy getting thrown into this with no experience. Same thing happened to me recently with Microsoft CRM and I posted lots of questions on the Microsoft forums and got good answers. Just giving back where I can...

Jeff
[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Apr 08 5:21 PM
I think I got it, I'll give it a shot tonight. I've got one more issue and I think I'm done. I created a custom table under the ticket table that is going to have datapumped in every night. I want to add a picklist on the csrticketinfo form and populate it from a column in my custom table and based on what value is selected fill in a text field. I thosght I had the picklist figured out but It never gets the data from the custom table. I created a picklist and an alias but no data. Any thoughts?

Thanks once again,
Tom
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Apr 08 6:16 PM
Tom,

When you add an item to a picklist in the web client, it doesn't permanently add it to the list. It sounds as if you need to use the #QUERYLIST tag. Basically, it executes a saleslogix query object and you can use that query object to return a picklist. My question back to you - the value in the text field you mentioned - is that to be used dynamically in an AJAX sort of way? Or is the value in the text field on the "previous" page, and after submission to the server do you then use that to populate when the user sees the next page? If you need the AJAX style, it's a lot tougher.

The basic idea is to (assuming you're not doing something AJAX style):

1) Create alias(es) for the column(s) you want in your picklist. You may only need one if you're storing the text value of the select control. If you need to have a display column and value column, you'll need two - one for each column.

2) Create a query object in web manager that returns the fields in question.

3) On your template, put a #QUERYLIST tag that references the created query.

That's the high level overview. A lot of how I would go about it depends if you need to dynamically populate/filter the list based on the text box control.

Jeff
[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Apr 08 11:18 PM
Jeff,

Thanks again for the reply. I'm sorry for the slow response but I was called out of town on another job. I'm going to put your suggestions into play tomorrow and I'll keep you posted.

Thanks again for all the help.

Tom
[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Apr 08 1:46 PM
Jeff,

I'm almost there but I have one more issue. I thought this would be easy but I just can't figure it out. As you suggested I built a QUERYLIST to populate a dropdown and everything is working fine. The default list item is blank (as I want it). Now when a user selects something in the dropdown I need to populate a textbox with the corresponding value from the database. For example if I select "Favorite Fruit" from the dropdown I want the textbox to say "Apple". Both "Favorite Fruit" and "Apple" are from the same table. I hope this makes sense. I thought it would be easy.

Thanks,
Tom
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Apr 08 3:52 PM
Tom,

It sounds as if you want a .NET AJAX type call, correct? If so, you have two choices:

1) Write you own web service that will take the value "Favorite Fruit" and spit out "Apple", "Orange", or whatever is appropriate for that account (or contact). Then you'll have to write the JavaScript to create an XMLHTTP object that will call the web service and process the results. But you'll also need to account for if they select "Favorite Vegetable" from the drop-down and return the correct vegetable, right?

2) The other option: create a SalesLogix #QUERY object that returns a query of the data in the table in question as XML and then parse the XML using JavaScript and populating your text box. (To return a #QUERY object as xml, add the attribute "output=xml" on the #QUERY tag on the HTML page. Note that the "xml" is lowercase; it fails in upper.) The caveat is that if this is a large table and the data can't be filtered by the current account/contact, etc., then you will get a large XML result back.

I'm not sure how you're using this, but it sounds as if it could be for security question challenge/response. If you return all the data as xml (option #2), it all goes across the wire and could be intercepted as well as all put on the client side, which could be a security risk. But I'm guessing what you're using it for, but that came to mind.

If neither answer makes sense, let me know. I've done both. I prefer the second method when in the confines of SLX if I can get away with it. One less external component to maintain.

Jeff


[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Apr 08 9:11 PM
OK Jeff,

I was hoping to have this completed today but I didn't make any progress. I think all that is left should be pretty simple but I'm lost. Here are the details;

I created a new table in the db that is only used as a lookup table (it gets updated nightly from another db). It contains 4 columns, ID, SerialNumber, Make and Model. On the "Create new Ticket" page I added three controls, one is a dropdown that contains all the serial numbers

<td nowrap="true"><#QUERYLIST query=serialnumberlist namecol=1 valuecol=0 name="serialnumber" options=ARV"></td>

the other two are Fields

<td><#FIELD name=productmake></td>
<td><#FIELD name=productmodel></td>

I have also created four aliases "informationid", "serialnumber", "prodmake" and "prodmodel" and and a query "serialnumberlist" that has 4 columns defined "informationid", "serialnumber", "prodmake" and "prodmodel". Now the #QUERYLIST is populated correctly with nothing selected when the page is loaded. When the user selects a serial number I need to fill in the "productmake" and "productmodel" #FIELDs, my initial thought was that those two values are returned from the #QUERYLIST but I couldn't figure out how to access them if they are available. I then worked on your suggestion above, using #QUERY but I am unclear as how to impliment it. Does the JS need to be called in the dropdown onchange event? Just as a test I tried to fill the #FIELDs by calling JS in the onclick event and setting the values like this;

function fillField()
{
var productmodel = "<#FIELD name=productmodel>"
//alert("productmodel = " + productmodel);

productmodel.value='aaa';
}

but nothing ever shows up in the "productmodel" #FIELD. After the ticket is created I also need to write those three values to the Ticket table (I created three new columns) I don't know if I am completely lost or if I am even remotely close. I don't mean for you to do my work but I am stumped and I have been scouring Google all day. I do appreciate all the help, I just want to close this project.

Thanks Again,

Tom


[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 08 11:14 AM
Tom,

Let me make sure I understand. The list of serial #'s is basically all serial #'s in the table and when the user selects one, you need to populate make & model for the selected serial #, right?

The ultimate problem with the #FIELD's not being populated (which you can do the way you have it in JavaScript) is that the #FIELD tags only work on detail templates (right click a template in web manager, select properties and you'll see the option). A query template is not bound to a specific record. A detail template, though, shows the data for a single record in the database. When you specify a template as a detail template, you have to tell it which table it's bound to. I'm guessing your template is a query template and so the #FIELD tags don't pull back data because the DLL doesn't know which table or record to get data from.

So how does the DLL know which record to pull back if you specify the table? When the page is processed by the web DLL, the DLL looks for a parameter in the request line called "id" and uses that value to retrieve the specified record. So for example, if you right click in the account details frame, it'll show a URL like:
http://server:port/scripts/slxweb.dll/view?name=accinfo&id=AQT9EA00C3HP&atemplate=accmain&ctemplate=conmain&otemplate=oppmain


If you look at the template accinfo in web manager, it's a detail template based on the account table. Looking at the URL you'll see the
id=AQT9EA00C3HP

query string parameter which tells the DLL to get the account record with that ID.

You mentioned that the table only has four columns - did you create it through the DB manager? If so, here's how I'd go about what you're trying to do. It's a bit different than what I outlined before, but I have a better idea of what you're trying to do.

Make your template in question a detail template. Base it on your table with the four columns. When the page first loads, simply pass in a bogus ID on the request string of 12 X's:
id=XXXXXXXXXXXX

Then, when the user selects a serial number from the drop down, call javascript that posts to a web action, puts the values in session (see below) and then reloads the same URL (document.location.href = "urlToGoTo"), but pass in the actual SalesLogix ID on the request string. Then your #FIELD tags should get the right data. This will mean that your #QUERYLIST query would have to have the SalesLogixID as the hidden value on the select control. I believe th parameter is "valuecol".

A couple of caveats: First, if your table is not a standard SalesLogix table (i.e., created through DB Manager), it won't work because it will expect a SalesLogix ID. Second, if you reload the form, entered values will be lost on the form. You can fix that, though, by creating in the web action that the form posts back to a Session ("SessionCreate"), populating it with the form values. And then on your template in the HTML controls, populate the values using a #SESSIONFIELD tag. That way user entered data doesn't get lost when you reload the form with the values they had already entered. For an example of the SESSIONFIELD tag, see the template accaddrchngcaller.

If your table wasn't created using SalesLogix, the only other option is to have a #QUERY tag that returns ALL data in the lookup table. Have it return the output as xml. An example of a template that uses the output=xml option on a query is accaddrchngconf. If you look in that template on the JavaScript function "confirmAddressChanges", you'll see where it has a "if (document.all.conaddrlist)" statement where it starts parsing the XML to do build the conAddr variable. The way I would envision yours to work is you search through the XML and find the serial number. When you find that, you can then get the product make & model.

What you're trying to do is NOT an easy web client customization when you aren't familiar with SalesLogix - so don't feel bad that it's giving you fits.

Does this make sense? Keep posting and I'll reply as I can.

Jeff


[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 08 11:30 AM
WOW! thanks, I think I want to approach it in the 2nd way you presented. I'm looking throught the accaddrchngconf file now. Now my only problem is that I am working with csrticket and it is a query page. How do I put the values into the #FIELD's

Thanks,
Tom
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 08 11:35 AM
Tom,

If you're going with the second approach, then it doesn't matter if it's a detail or query template. The reason is that you don't need to reload the page - all the data you'll need is in the output XML from your query.

My only question: how big will your lookup table be? If you create a query that returns all records, will it return 10, 100, 1000, or 10,000 records? If it's going to be a really big result set, can you put conditions on the query to filter it to a more manageable size? If not, you need to consider that all that data gets sent to the client, creating a big page for the user to download.

The key is that if you return the output as XML that you can parse it using JavaScript. There's a ton of examples out there beyond the ones in the acaddrchngconf file. Fortunately you can use some of the IE shortcuts on XML parsing - much easier than the open standards version.

Jeff

[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 08 1:15 PM
Jeff,

Here is where I am stuck right now. If I can get past this I think I understand the rest.

function ShowValue()
{
var producttype = "<#F name=producttype>";

producttype.value = "qqq";
alert("producttype.value = " + producttype.value);
}


<td nowrap="true"><#QUERYLIST query=serialnumberlist namecol=1 valuecol=0 name="serialnumber" options=ARV onchange="javascript: ShowValue();"></td>

<td><#FIELD name=producttype></td>

I keep getting producttype.value = undefined and the #FIELD never gets populated. I am doing this on csrticket set as a query page. What am I doing wrong?

Thanks,
Tom
[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 08 1:16 PM
BTW I never expect my list to be over 100 items.
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 08 1:22 PM
Tom,

Unless you changed the template to a detail template, the #F tags won't resolve - it needs to know which detail record you're on. It can only know that if you change it to be a detail template, set the main table and you put the id=XXXXXXXXX value in the request string. But, from what it sounds like, you don't need the detail page because you want to go the route of putting a hidden query on the page with the output in XML and the parse the XML to populate the field. For 100 or so records, I think that's fine.

If you put your #QUERY tag with the "output=xml" on it and you view source on the page, does the XML show up on the page? If so, then you just need to write the JavaScript to parse the XML and put the value in your text field, similar to what's in the accaddrchngconf template.

Jeff
[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 08 5:07 PM
Jeff,

I am getting the correct xml and I am able to parse it. Yippee!!!!! Now my problem is still with the #FIELDs. I am working with the csrticket page and it is setup as a query page. I know that things won't work as they are so can I change it to a detail page without messing anything up or should I go with the <input type="text" name="zzz" value=""> format for my text boxes? This is way more involved than I thought it would be and I really appreciate your help.

Thanks,
Tom
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 08 5:37 PM
Tom,

You're almost there! You've got it - just put your text box exactly as you have it, just leave the #FIELD out of the value="" area (as you have it). Then in javascript:

document.mainform.zzz.value = "your parsed XML value";


You don't need the #FIELD's if all you want to do is populate your text boxes and then have the data updated when the user clicks save. The real use in the #FIELD tags is to get data FROM the database, not INTO it. It sounds as if you're getting the data from your XML data island and parsing it, so if I understand things, don't worry about the #FIELD tags.

It is a bit involved as are most customizations with the old school SLX web client. I've been working with since around 2000 and I can make it bend to my will pretty easily now. It's outdated & temperamental, and it's caused me many headaches, heartache & pain along the way. But it's kept me employed...

Let me know when you get it done!

Jeff
[Reply][Quote]
Tom Foster
Posts: 22
 
Re: newbie needs help disabling controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 May 08 10:34 AM
Jeff,

I'm begining to see the light!!! My textboxes are being populated with the correct values depending on the dropdown value. Now I am unsure how to save these values. As you recall I created three new columns in the Ticket table. When I create a new ticket all the information is saved correctly EXCEPT my three new values (Serial Number, Make and Model) but I expect that since I have not done anything to save the values. How do I save this information when the user clicks the save button.

Thanks once again,
Tom
[Reply][Quote]
 Page 1 of 2Next > >> 
  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): 5/7/2024 10:51:53 PM