Pages

Wednesday, January 29, 2020

Siebel Issue in Product export: 

Error: Too many records that could be returned (SBL-DAT-00500)



While exporting products from Dev environment, you might get below error in a newly setup environment.


Error details:


The' NextRecord' method of Business Component' Object Rule Nodes ImpExp BC' (Integration Component' Object Rule Nodes ImpExp BC') returned the following error:
"Too many records that could be returned . Refine your query so that fewer rows are retrieved.(SBL-DAT-00500)

Root cause:

The DSMaxFetchArraySize and MaxCursorSize are not sufficient for the number of records to be exported

Solution:


  • Navigate to : Site map -> Administration - Server configuration -> Enterprise -> Profile configuration
  • In Enterprise Profiles Search for ServerDataSrc in the Alias column.
  • In the lower applet (Profile Parameters) click on the "Advanced" tab and search for DSMaxFetchArraySize in the Alias column.
  • Change the value to -1 from 0
  • Then restart the server.


Hope this helps...

Monday, June 5, 2017

Creating a sequence of activities

Customer requirement:

There are some approval activities in opportunity as Gate 0 Approval, Gate 1 Approval, Gate 2 Approval, Gate 3 Approval, Users will be allowed to create each approval only after the previous approval activity status is "Approved" except Gate 0 Approval.

Solution:

This I have achieved basically through scripting. First we have to create four different activity types for the above requirement. I have created below four activity types under Administration- Data -- List of Values (Lov Type - TODO_TYPE)
  1. ESGB Gate 0
  2. ESGB Gate 1
  3. ESGB Gate 2
  4. ESGB Gate 3
Then we can write validation under BusComp_PreSetFieldValue of 'Action' BC to validate the previous activity status, when the user select the activity type. 
Here as we have to validate three activities, I have written a general function and then associated the function at BusComp_PreSetFieldValue .
Please be reminded that, the Action BC should be a child of Opportunity BC while we do this validation.

Function ESGBApprovalSeq(fVal)
{
var optyId ="";
//Verify whether the Parent is Opportunity
if (this.ParentBusComp() != null)
{
if (this.ParentBusComp().Name() == "Opportunity")
{
//Get the Opportunity ID related to the activity.
var Optybc = this.ParentBusComp();
optyId = Optybc.GetFieldValue("Id");
}
}
//Search in Action BC for activities which is having the opportunity ID, 
//Activity type defined by function variable and activity status as approved

var boBusObj = TheApplication().GetBusObject("Opportunity");
var bcAct = boBusObj.GetBusComp("Action");
with (bcAct)
{
ClearToQuery();
SetViewMode(AllView);  
ActivateField("Status");
SetSearchSpec("Opportunity Id", optyId);
SetSearchSpec("Type", fVal);
SetSearchSpec("Status", "Approved");
ExecuteQuery(ForwardOnly)
//If No such record throw error;
if(FirstRecord()== false)
{
this.UndoRecord()
TheApplication().RaiseErrorText("Previous Gate Approval not yet completed!");
}
}
}


In BusComp_PreSetFieldValue , write below;

function BusComp_PreSetFieldValue (FieldName, FieldValue)
{

if(FieldName == "Type")
{
if (FieldValue == "ESGB Gate 1")
ESGBApprovalSeq("ESGB Gate 0")
else if (FieldValue == "ESGB Gate 2")
ESGBApprovalSeq("ESGB Gate 1")
else if (FieldValue == "ESGB Gate 3")
ESGBApprovalSeq("ESGB Gate 2")
}


}

This will validate whether the defined activity status is "Approved"

Hope this helps...