SiebelGuide.com/siebelblogs

Siebel Blogs, News, Events, Tips and Tricks
Filed under Tips&Tricks, eScript, All

During many circumstances especially while using web services, we traverse through the property sets to check for different things and take appropriate action. One of those checks could be to check the expected property exists. PropertyExists method in Siebel eScript ensures that the specified property exists in a property set. This is a very useful method. The check is similar to using an if statement after ExecuteQuery() to make sure that it returns at least one record. This PropertyExists method is be used with if statements. This post can also fall under one of the best practices while writing eScript.

Syntax
oService.PropertyExists(propName)

Returns
In Siebel VB, an integer (0 for false, 1 for true); in other interfaces, a Boolean

For example here is a property set that I have used it before in my blogs.

<SOAP-ENV:Header>
<UsernameToken xmlns="http://siebel.com/webservices">SADMIN</UsernameToken>
<PasswordText xmlns="http://siebel.com/webservices">SADMIN</PasswordText>
<SessionType xmlns="http://siebel.com/webservices">Stateless</SessionType>
</SOAP-ENV:Header>

Scenario: In the below code I will have the above property set passed as Inputs for Business Service.I will have to check that the child property UsernameToken exists in the given property set otherwise I need to add that. Here is code to check that.

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
if (MethodName == "CheckHeader")
{
if (Inputs.GetChild(0).GetChild(0).PropertyExists("UsernameToken"))
{
//do something or nothing
}
else
{
//add Username Token
}
}
}

I hope this post gives some clear explanation about this property set. Shoot me a comment if you have any questions.

Related posts(Auto Generated):

  1. PropertySets in Siebel - Made Easy
  2. eScripting Best Practices - Part5
  3. eScript Best Practices - Part7
  4. eScript Best Practices - Part6
  5. Siebel Automatic Login URL

Posted by Sridhar on Tuesday, September 16th, 2008


Page copy protected against web site content infringement by Copyscape
You can follow any responses to this entry through the magic of "RSS 2.0" and leave a trackback from your own site.

One Response to “PropertyExists Method in Siebel eScript”

Post A Comment

Recent Posts 

Recent Comments:

  • zenmed promo code: I understand that there are a lot of spam lately. Apparently it’s pretty difficult for people to...
  • Anupama: @Archana Whenever we use the UI to trigger a workflow use Runtime events. Use Workflow Policy whenever it is...
  • Judy Schreck - CDI Corporation: Systems Developer I-II/CRM Analytics Tech Lead (Oracle Siebel/OBIEE) CDI is seeking a CRM...
  • Moinuddin: Thank u very much. I am thankful to u for this valuable information.
  • remote support: i like this post greatly. ill be checking laterfor future readsthanks.