This is a post for basic Siebel eScripting learners/ beginners.
For scripting experts, it is easy to start writing script without any reference. But a fresher might get struck about where to start. I think I can say that whatever you do in the application can be correlated to eScript.
Let me show you an example.
Requirement:Write Business Service script with a method, to add a position to the MVG Account Team to an Account.
Solution:Now, how do you add a position to a Account from the application?
1. Login to Application
2. Go to Account View
3. Search for Account record
4. Find Position field and open MVG.
5. In MVG, look for the desired position in associate applet.
6. Add record by clicking Add button.
Whatever you do in UI Layer can be related to Business Layer and Database Layer.
Now each of the above steps can be written in code.
First, Get the application.
TheApplication() is the method.
Go to Account view. A view is related to a Business Object.
Get the business object.
BO = TheApplication().GetBusObject();
In the view, look for an applet. Applet is related to a Business Component.
BC = BO.GetBuscomp("Account");
Now within the Applet query for a record.
with(BC)
{
ClearToQuery(); // click on Query button -- it clears the applet of any existing records and shows query mode
SetSearchSpec("Account Name","3 Com"); // in Account Name field, Write '3 Com'
ExecuteQuery(); // click on Go button
if (FirstRecord()) // if it returns a record - get first record
{
MVGBc = GetMVGBusComp("Position"); // go to position field and click on MVG, it opens an applet - which is related to a BC
var AssocBC = MVGBc.GetAssocBusComp(); // go to the associate applet
with (AssocBC)
{
ClearToQuery(); // click on Query button -- it clears the applet of any existing records and shows query mode
SetSearchSpec("Position Name","ABC"); // in Position Name field, Write 'ABC'
ExecuteQuery(); // click on Go button
}
if(FirstRecord())
{
Associate(); // click on Add button - check the method invoked on Add button
}
}
}
This is just my conceptual view of writing script. This way we can visualize what script we are going to write with what we do in the application.
For scripting experts, it is easy to start writing script without any reference. But a fresher might get struck about where to start. I think I can say that whatever you do in the application can be correlated to eScript.
Let me show you an example.
Requirement:Write Business Service script with a method, to add a position to the MVG Account Team to an Account.
Solution:Now, how do you add a position to a Account from the application?
1. Login to Application
2. Go to Account View
3. Search for Account record
4. Find Position field and open MVG.
5. In MVG, look for the desired position in associate applet.
6. Add record by clicking Add button.
Whatever you do in UI Layer can be related to Business Layer and Database Layer.
Now each of the above steps can be written in code.
First, Get the application.
TheApplication() is the method.
Go to Account view. A view is related to a Business Object.
Get the business object.
BO = TheApplication().GetBusObject();
In the view, look for an applet. Applet is related to a Business Component.
BC = BO.GetBuscomp("Account");
Now within the Applet query for a record.
with(BC)
{
ClearToQuery(); // click on Query button -- it clears the applet of any existing records and shows query mode
SetSearchSpec("Account Name","3 Com"); // in Account Name field, Write '3 Com'
ExecuteQuery(); // click on Go button
if (FirstRecord()) // if it returns a record - get first record
{
MVGBc = GetMVGBusComp("Position"); // go to position field and click on MVG, it opens an applet - which is related to a BC
var AssocBC = MVGBc.GetAssocBusComp(); // go to the associate applet
with (AssocBC)
{
ClearToQuery(); // click on Query button -- it clears the applet of any existing records and shows query mode
SetSearchSpec("Position Name","ABC"); // in Position Name field, Write 'ABC'
ExecuteQuery(); // click on Go button
}
if(FirstRecord())
{
Associate(); // click on Add button - check the method invoked on Add button
}
}
}
This is just my conceptual view of writing script. This way we can visualize what script we are going to write with what we do in the application.
Wow
ReplyDeleteaha
ReplyDeleteIts really awesome ,very simple explanation
ReplyDeleteThank you for providing good information from Kexlin
ReplyDeleteYou are in the right place for a perfect solution for any app development company in hyderabad. We are well known for delivering the best quality Mobile Application Development Solutions to our clients.
it’s very helpful thanks for your valuable information follow us
ReplyDeletesalesforce cpq online training Hyderabad