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!
|
|
Help... SLX is acting strange and I can't figure it out.
Posted: 12 Sep 07 2:28 PM
|
Hello, I have a very strange situation that I just don't understand.
I'm running SLX 6.2.6
I have created a Status History table to record the Account statuses and some comments when a user changes the status. I also have an account tab that shows this history.
I've created a data form called StatusHistoryEdit that I invoke when the user changes the status.
I first create a StatusHistory record then I pass the record ID to the form using the following command
Application.BasicFunctions.ShowViewForRecord("StatusHistory","StatusHistoryEdit",strStatusHistoryID)
When the user saves the data and closes StatusHistoryEdit, the AccountDetail onChange event is fired.
The strange thing is that when one user, the one I did my testing with, changes the status and fills out the StatusHistoryEdit form, everything works just fine, but when another user does the very same thing, the status field is reverted back to the previous value right before the onChange event is fired. This presented AFTER I deployed to production. I've stepped through the code in debug mode as each user and as soon as the StatusHistoryEdit OnValidate event completes, the status field for one user is left unchanged, while the other user is reverted.
I'm very confused about what actually goes on behind the scenes in SLX. I say that realizing that I might be missing something, I just can tell what it is.
Anyway, I'm going to just store the status value before invoking the edit form and then set the status picklist after the form closes.
I welcome any thoughts that might help improve my sanity. |
|
|
|
Re: Help... SLX is acting strange and I can't figure it out.
Posted: 12 Sep 07 3:01 PM
|
I have ran into similar situations before. Seems like the view is refreshed before the data is posted. For some reason on some users it saves on others it reverts back.
My advice, save the form before you invoke your code to track the change. You do this programatically by calling the Post function of the form. (I have done it on 6.2.4 so I know it is available for you on 6.2.6)
|
|
|
|
Re: Help... SLX is acting strange and I can't figure it out.
Posted: 12 Sep 07 4:02 PM
|
Hello Raul,
Thank you for confirming that I'm not crazy, at least in the regard .
I tried was you suggested and it works, but posting before showing the form takes too long. It creates an uncomfortable delay, so I'm going to stick with resetting the value in the field after the form closes.
Thank you. ...Rob |
|
|
|
Re: Help... SLX is acting strange and I can't figure it out.
Posted: 12 Sep 07 4:05 PM
|
I got to say that is a bit strange that posting takes that long. May be an issue on your version, but as long as you have it under control...
Sometimes you just got to wire SalesLogix your own way to get things working as desired. |
|
|
|
Re: Help... SLX is acting strange and I can't figure it out.
Posted: 12 Sep 07 4:15 PM
|
Yeah, things are taking longer than I think they should in certain actions. We have customized a lot of SLX and I'm sure there are many improvements to be gained from a couple weeks of performance tuning. For example, while debuging, I sometimes see forms refresh multiple times which is strange to me, but I'll save that for another posting when I have more time.
Thanks again. |
|
|
|
Re: Help... SLX is acting strange and I can't figure it out.
Posted: 12 Sep 07 4:20 PM
|
After your last reply, I thought I might be doing something wrong with the post and I was. I was calling application.mainview.activeview.post instead of frmAccountDetail.post.
Posting at the frmAccountDetail level is much faster, I think I will use that option.
Thank you. |
|
|
|
Re: Help... SLX is acting strange and I can't figure it out.
Posted: 12 Sep 07 4:26 PM
|
Ah!
I guess you read my reply a bit closer. I did say use the Form' Post (but I was at somepoint going to type Mainview.Post, glad I didn't)
That is the function that I have used in the past, and it does work fairly quickly.
Glad to be able to help you!! |
|
|
|