Thursday, July 14, 2011

drilldown on ActivityType in Activity Applet. It doesn’t take you to the record you have clicked on but takes you to the firs

Thanks Bhavesh for sharing below info

When on Home Page, and drilldown on ActivityType in Activity Applet. It doesn’t take you to the record you have clicked on but takes you to the first record in activities.

à What was done to fix it.

Go to the Activity Home Page Applet. Check for all drilldown objects on ActivityType

Add ‘Id’ (specifically) in Source & Destination fields

Compile n release the SRF

Siebel v7.7 has a different query than v8.1..

Sample Thick Client Not working .IE showing Page Cannot be displayed

Thick client is not working for sample in IE 7 .

I tired below things
  • Put the site under Trusted Site
  • Checked for the ODBC Connection
  • tried to open from debug mode [Still not working ]
At last i did two changes i dont know which helped me in resolving it .

--> Client CFG >> EnableFQDN Changed to False
Siebel Mobile Web Client. To use FQDN for this client type, configure the following parameters in the Siebel application configuration file, such as uagent.cfg for Siebel Call Center, on each local client machine.

[Siebel]
EnableFQDN = TRUE

EnableFQDN is set to TRUE by default for the Siebel Mobile Web Client.

If you do not also specify the FQDN parameter, the system constructs the URL automatically. For example, the system might construct the FQDN for CCHENG as ccheng.corp.oracle.com. Optionally, you can explicitly provide similar information below, using the FQDN parameter.

CAUTION: When you explicitly configure an FQDN for use with the Siebel Mobile Web Client, you must specify the local machine name. The localhost string from the default Siebel Mobile Web Client URL (which is used when EnableFQDN = FALSE) cannot be used as an element in an FQDN. The localhost string is only functional when used by itself, with no additional qualifying elements.

FQDN = hostname.primaryDNS.domainsuffix

where:

* hostname is the name of the local client machine
* primaryDNS is the primary part of the domain name (such as siebel)
* domainsuffix is the domain type (such as com)

For example, you might set FQDN to ccheng.corp.oracle.com.
---> Reinstall IE 7

after doing tht it starts working

thanks and regards
Joseph (Joju)
joju2002@gmail.com

Tuesday, July 5, 2011

Calc the working days between two days including the public holidays

Using below code we can find the number of working days between two dates inculding the public holidays . I wrote this code long back for one POC .I guess it will work :-) .

Req : I have to find working days between two dates ie : i have to remove weekends/ Public Holidays between two dates



function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
if (MethodName=="Working Days")
{
//MM DD YYYY format
var StartDate = Inputs.GetProperty("StartDate");
var EndDate = Inputs.GetProperty("EndDate");
var start= new Date(StartDate);
var end = new Date(EndDate);
var abc=0;
// On application fill the Public Holidays from Application
// Under Adm-Service update all the public holidays

var sBO=TheApplication().GetBusObject("Shift");
var sBC=sBO.GetBusComp("Shift Exception Hour");

with(sBC)
{
SetViewMode(AllView);
ActivateField("Exception Id");
ActivateField("Start Date");
ClearToQuery();
SetSortSpec("Start Date(DESCENDING)");
SetSearchSpec("Exception Id","1-1JJB");
// Row id is the Schdule name
//Better give the Name instead of rowid .
ExecuteQuery(ForwardBackward);
var irec=FirstRecord();


while(irec)
{
var Holiday =GetFieldValue("Start Date");
var Holiday1=new Date(Holiday);

if(Holiday1.getDay()!=0 && Holiday1.getDay()!=6 )
{
if(Holiday1.getTime() >= start.getTime() && Holiday1.getTime() <= end.getTime())
{
abc=abc+1;
}

}
if (Holiday1.getTime() < start.getTime())
{
break;
}
else
{
irec=NextRecord();
}

}


}

sBC=null;
sBO=null;


var diffDays= Math.floor((end-start)/1000/60/60/24);
var weeksBetween=Math.floor(diffDays/7);
var startDay=start.getDay();
var endDay =end.getDay();
if(start.getDay()==end.getDay())
{
var adjust=0;

}


else
{
if (start.getDay()==0 && end.getDay()==6)
{
var adjust=5;

}

else
{
if(start.getDay()==6 && end.getDay()==0)
{
var adjust=0;
}
else
{
if(end.getDay()==6 || end.getDay==0)
{
var adjust=5-start.getDay();
}
else
{
if (start.getDay()==0 || start.getDay==6)
{
var adjust=end.getDay();
}
else
{
if(end.getDay()>start.getDay())
{
var adjust=end.getDay()-start.getDay();
}
else
{
var adjust =5+end.getDay()-start.getDay();
}
}


}

}

}


}


var workingDaysCalc=(weeksBetween*5)+adjust-abc;



Outputs.SetProperty("workingDaysCalc",workingDaysCalc);

// TheApplication().RaiseErrorText("Start Date :"+start +"End Date :"+end +"ABC:"+abc+"Working "+workingDaysCalc);
return(CancelOperation);
}

return (ContinueOperation);
}