Issue with setting primary in MVG
Hi All,
Following is the piece of code.
Here I'm just trying to associate a record in the MVG applet through scripting.
Details of the MVL:
Following is the piece of code.
BusObj = TheApplication().GetBusObject(BusObjectName);
pBC = BusObj.GetBusComp(ParentBusCompName);
pBC.SetViewMode(AllView);
pBC.ClearToQuery();
pBC.SetSearchSpec("Id", ObjectId);
pBC.ExecuteQuery(ForwardOnly);
if(pBC.FirstRecord())
{
MVGBC = pBC.GetMVGBusComp(MVGField);
ChildBC = MVGBusComp.GetAssocBusComp();
ChildBC.SetViewMode(AllView);
ChildBC.ClearToQuery();
ChildBC.SetSearchExpr(SearchSpec);
ChildBC.ExecuteQuery(ForwardOnly);
if(ChildBC.FirstRecord())
{
ChildBC.Associate(NewAfter);
}
}
pBC = BusObj.GetBusComp(ParentBusCompName);
pBC.SetViewMode(AllView);
pBC.ClearToQuery();
pBC.SetSearchSpec("Id", ObjectId);
pBC.ExecuteQuery(ForwardOnly);
if(pBC.FirstRecord())
{
MVGBC = pBC.GetMVGBusComp(MVGField);
ChildBC = MVGBusComp.GetAssocBusComp();
ChildBC.SetViewMode(AllView);
ChildBC.ClearToQuery();
ChildBC.SetSearchExpr(SearchSpec);
ChildBC.ExecuteQuery(ForwardOnly);
if(ChildBC.FirstRecord())
{
ChildBC.Associate(NewAfter);
}
}
Here I'm just trying to associate a record in the MVG applet through scripting.
Details of the MVL:
Auto Primary - Default
Check No Match - N
Primary Id Field - <primary id field in parent buscomp>
Source Field - <empty>
Use Primary Join - Y
Check No Match - N
Primary Id Field - <primary id field in parent buscomp>
Source Field - <empty>
Use Primary Join - Y
0