11-17-2011 06:14 PM
issue with hide ReqBy if ReqBy = ReqFor
So a new requirement on my project is to hide ReqBy if ReqBy=RegFor.
Easy I thought:
if ( ReqInitiatorID == ReqCustomerID )
{
//code simplified
serviceForm.RC_REQUESTEDBY.setVisible(false);
}
Well during the service auth moment for some reason the following code is added by nS:
<!-- this is a necessary no-op page -->
<script type="text/javascript">
var Moment = 'stauthorizations';
var EditRequisitionBeforeOrdering = false;
var Context = 'MyServices';
var UserID = '4';
var ReqCustomerID = '0';
var ReqInitiatorID = '0';
var ReqID = '404';
var ReqEntryID = '375';
var TaskID = '0';
var TaskName = '';
var ServiceID = '170';
var ServiceName = 'One Catalog Service';
var whichButton = "";
//Why would they reset the vars to 0 is way beyound my understanding
Code above suggests 0=0 and By will always be hidden.
Did anyone else figure this out? I thought I'd ask before spending a lot of time?
11-17-2011 06:14 PM
This is a "feature" that was fixed in subsequent releases. (Previously ReqCustomerID and ReqInitiatorID were only populated in the ordering moment.) Workaround is to check the (previously stored) values of the PersonId in the ReqBy and ReqFor dictionaries.
11-17-2011 06:14 PM
I was hoping not to use form data .. but did that this morning and it worked.Thanks Leslie :)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide