Tuesday, 16 September 2014

SIEBEL: Extract SIF file from SRF

This post is a response to one of my friend's question. Can we get a SIF file of an applet from a SRF file? 

Scenario: We have a customized SRF file, connection to server DB and sample DB. Now we know that the Contact list applet is customized and compiled onto this SRF. Now we want to get a SIF file of the SRF.

Solution: Most of the people I approached, said it is not possible. But there is a solution!!

If you have a SIF file, try opening it with Notepad++ and observe that the SIF file is a Structured XML.




This gave me the idea. If I can build an XML similar to the SIF and save it as .SIF file, I will have my SIF file ready.

Step 1: First I created a dummy applet with all the child entities like Applet Browser Script,Controls, Menu Items etc. This step is to make sure that you have a dummy XML with all the applet elements in it. Exported it as a SIF file. Open the file with notepad++ and copy the XML. Using any online source, convert this XML to XSD. (I used this). Create an Integration Object using this XSD (use EAI XSD Wizard). Now this is the structure we want to get a new SIF file. Name the IO as Siebel Information IO.

Step 2: Create a new Siebel BO based IO (EAI Siebel Wizard) using BO Repository Applet. This is a vanilla BO. Make sure to include all the child items (Applet Menu, Web template Item,Applet Server Script etc) while creation. Name it as Repository Applet IO.

Step 3: Create a new IO data mapper under Administration Integration with destination IO as Siebel Information IO and source as Repository Applet IO.
Make sure you map all the fields properly. Get the project and repository details from Repository Applet IC fields (Project Name, Repository Name etc) and map the same. Compile the changes to your custom srf.

Step 4: Create a workflow with first step to query Repository Applet IO using EAI Siebel Adapter. Provide the Applet name as Input to query. In second Step, map the Repository Applet IO to Siebel Information IO using EAI Data Transformation Engine service. In the subsequent steps, convert the EAI Siebel Message to XML (EAI XML Converter) and write the file (EAI XML Write to File) to a location with name "Contact Form Applet.sif". 

Simulate the Workflow in your application connecting to your DB after opening it using your custom SRF and voila!! you have your SIF file with object definitions from your custom SRF.

What I did was: identified how siebel stored information in sif files, identify how siebel repository BO stores the information, query a siebel BO based IO, map to sif structure and write to sif file.

Go ahead and try it. It is a time taking process but it is worth if you have this kind of requirement. We can extract SIFs like Business Components, Business Services etc using Repository Business Component, Repository Business Service IOs. We can do this for all the objects in tools.

Let me know your thoughts on this!!

Monday, 8 September 2014

Salesforce WSDL testing using Soap UI

In this post I am going to discuss about how to test Salesforce WSDL using Soap UI. This is pretty basic stuff but for beginners this might be helpful.

You need to download the WSDL from your application from Setup -> Develop -> API -> Generate Enterprise WSDL. 

Copy and save the WSDL into a .wsdl file.

Import this WSDL in Soap UI. It will import methods like Create, Convert Lead, login, update, upsert etc.

First we need to get a session Id to access data in salesforce. To get this, we need to call login method in the WSDL.

The login method input should look like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
   <soapenv:Header></soapenv:Header>
   <soapenv:Body>
      <urn:login>
          <!--Salesforce Username:-->
         <urn:username>khadar.pathan@gmail.com</urn:username>
           <!--password appended with session token:-->    <urn:password>NewPasswordc4w5ePZbF3dBokl1BrWr</urn:password>
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope> 

You need to get the session token from below location in the application. 
This will send an email to your account with session token. You need to append your password and this token if you are trying to login to application from anything apart from a browser (like SOAP, Force.com IDE etc). 

You might get this error if you do not give session token "Invalid username, password, security token; or user locked out."

The output of above request gives server URL and session Id.

Using this session Id in Soap header and URL as service end point, you can create, delete, update, upsert or do any operation from the WSDL. If you do not change the service end point, you will get error "Destination URL not reset. The URL returned from login must be set in the SforceService".

In the below example, I have created a new Account. Sample Soap messages to create the data can be found at https://developer.salesforce.com/page/Sample_SOAP_Messages


Hope this helps!!

Monday, 21 July 2014

MS CRM: CRM for Outlook configuration

MS CRM application can be created as a profile in Outlook by installing and configuring CRM for outlook plug in. Download it here.

Once you install the application, you need to configure the profile.

Run the configuration wizard, enter your credentials and synchronize the organisation data.
Close the wizard and open outlook. You can find the application related information in Outlook folder structure as a profile in outlook.
This way, instead of relying on a browser, we can use application in outlook more efficiently. Advantages include working offline capability, synchronization with emails, reminders for Alerts and meetings and so on.

MS CRM: System Administration

In this post, I am going to introduce some basics of System Administration in MS CRM. 

You can access Administration options from Microsoft Dynamics CRM -> Settings -> Administration. Few important options/features are defined below. 

Auto Numbering: We can specify a format of auto numbering like below. 
Business Units: We can create the organisation hierarchy by using Business Units. We can define a BU, add users, teams, child BU etc to it. If I disable a BU, no user in the BU will be able to access the application.
Security Roles: Security role is the entity where we mention which objects should be accessible and upto which access level for a user role. We assign security role to user. This is the most important security feature of MS CRM.

Teams: We can define teams of users and group them as a logical entity.
System Settings: We can define calendar settings, currency settings, format of numbers, email tracking options etc for the organisation in this section.
Field Security Profiles: We can define a security profile for users to provide access to modify certain field data. (Example: only a manager can edit quote amount)

MS CRM: Default Solution, Managed and Unmanaged Solutions

Solutions: All the configurations in an MS CRM application is maintained in a solution. It is a repository of configuration items like Entities, Fields, Forms, reports, Dashboards etc. People who are new to MS CRM can get confused easily by terms like Default Solution, Managed Solution and Unmanaged Solution.

Every application will have one default solution defined with all the basic entities. Default solution is a vanilla solution. It is recommended not to modify anything in a default solution. We should create our own custom solution. Every custom solution once created is a unmanaged solution. Once you are done with your customization, you need to make it a managed solution, meaning that you do not let anyone modify the solution. It is locked and can be moved to other environments as a package.

We can add unmanaged solutions, do our customizations in it, export it as a Managed solution and import it to higher environments as a Managed solution. If a managed solution is deleted, it deletes all the customizations. For testing in unmanaged solutions, we need to publish the customizations.

Navigate to Microsoft Dynamics CRM -> Settings -> Customizations

You can access default solution by clicking Customize the System link.

You can create, access or modify custom solutions by clicking Solutions link.


A default solution looks like this.



MS CRM: Application UI Sections and Navigation Basics

This series of posts on MS CRM will be targeted for a novice developer. I will start with basics and later on extend it to complex functionalities. I will be providing some video tutorials later covering these topics with a use case.

Microsoft Dynamics CRM is a software package developed by Microsoft. MS CRM is gaining a lot of CRM market lately.


Microsoft Dynamics CRM is available in two primary delivery mechanisms:
Dynamics CRM On-Premises and Dynamics CRM Online.
The on-premises version of CRM is hosted by the customer in an on-premises server. With CRM Online, Microsoft takes over the hosting responsibilities. Decision points like direct access to SQL tables and expanded backup capabilities can drive the decision to go on-premises or online.

I am going to use CRM Online only in my posts as I have limited access to a trial version of MS CRM application. You can get one month trial access by registering in the link

After registering, the application will look like this. By default, we will have Sales, Service and Marketing modules. I am going to explain basic navigation steps below.


The red box indicates the application bar where on clicking the Microsoft Dynamics CRM drop down, the available apps and the settings can be accessed.

On selecting an App (like Sales dropdown), the available entities will be shown like below.
On selecting an entity, it will show the recent records and the records of the entities in below section.

We have a quick Create option also.

The green box shows the default view of the entity selected (Dashboard in this case), the one which we want to see on home page. We can change the default any time by changing our preferences. 

The yellow box is a what's new section, showing recently created, updated records information. We can follow a particular record and the updates will be shown in follow section in the right.

I will explain about the steps to configure application in further posts.

Sunday, 20 July 2014

SIEBEL:XML Hierarchy, Binary XML, XML Encoding and other usages in Siebel

A lot of people get confused with using terminologies like XML Hierarchy, Binary XML, Encoding in XML, XML Hierarchy etc. Siebel has a lot of functionality built on XML and uses vanilla business services for this purpose.

First of all, an XML document is just a valid XML. Data in any XML file can be considered as a XML document. A well formed XML is a standard to create and use XML documents. Now let us look at how siebel uses XML. 

XML is a transport language. We use XML to transfer data from one system to another in a well formed readable format. During Siebel EAI transactions, data is sent and received in XML formats. Consider this example where we send account information to external system from siebel.

I will call EAI Siebel Adapter BS, Query method to create an instance of Integration Object. The output is a property set of type SiebelMessage. It will have properties with Name as Integration Component field name. When I send this information to external system, it will send the xml name of the field. When external system sends data,it is an XML but when we receive it, it will be a property set message. We process the message using EAI Siebel Adapter service. 

As in the below example, if I have a field 'Integration Id' in IC, it will be the same in SiebelMessage but in XML, it will be IntegrationId.




An XML can be converted to Property Set or Siebel Message using EAI XML Converter business service. 

If I do a EAI Siebel Adapter query, we get property set output. If I convert the property set to an XML document using EAI XML converter, it gives XML as a string in output of type <Value>. 


If you look at above screenshot, the test case 1 is as output of EAI siebel adapter query method. I used it to convert the property set to XML Document (as seen in Value field) using EAI XML converter BS. I got test case 2 record as output. I used the XML document and converted it to XML Hierarchy which is again a property set with XML tags as properties.

I have exported the structure of data from BS simulator.

Siebel Message looks like this.



An XML Doc looks like this.

An XML Hierarchy looks like this.




Below table describes few differences of the terminology.



XML Encoding is a standard which we use to make sure that every character is unique. I can send special characters in an XML document. Every character should be understood by the receiving system. If I use English and the other person use French, we should be able to communicate with each other properly. For this, a standard called Unicode is in place. It has a unique code for each character in almost all the languages. This way, data transfer can occur without loss of meaning. 

Unicode is an industry standard for character encoding of text documents. It defines (nearly) every possible international character by a name and a number.

If you look at the below line, the attribute encoding denotes the type of Unicode used for encoding. UTF-8 is commonly used encoding. 

<?xml version="1.0" encoding="UTF-8"?>

Binary XML is an XML with encoded binary data. The text is converted to binary data and the XML is formed with the binary information. This makes the XML as not readable by humans. This has an added advantage of performance. I will cover this topic in another post.

Hope this explains the XML usage in Siebel terms.