Codifo escript

Solo disponible en BuenasTareas
  • Páginas : 2 (482 palabras )
  • Descarga(s) : 0
  • Publicado : 24 de noviembre de 2011
Leer documento completo
Vista previa del texto
function Ax_Condition_Attribute(Inputs, Outputs)
{
try
{
// Local declarations
var lw_str_ItemId = ""; // Property Item Id
var lw_str_Attrib = ""; // Attribute collectedfrom parameters
var lw_array_Attrib = new Array();
var lw_array_AttribValue = new Array();
var lw_str_AttrName = "";
var lw_str_Condition = "";
var lw_bool_Condition;var lw_str_AttrValueEval = "";
var lw_str_AttrValueReal = "";
var lw_array_Eval = new Array();
var lw_str_Expresion = "";
var lw_obj_bo = ""; // Holds Main BOvar lw_obj_bc_XA = ""; // Holds Attributes BC for Main BO
var lw_str_isRecord = "";
var lw_str_Qry;
var lw_bool_Validate = 1;

// Get Property from inputslw_str_ItemId = Inputs.GetProperty("Item Id");
lw_obj_bo = Inputs.GetProperty("Business Object");
lw_obj_bc_XA = Inputs.GetProperty("Business Component");
lw_obj_bo =TheApplication().GetBusObject("Quote");
lw_obj_bc_XA = lw_obj_bo.GetBusComp("Quote Item XA");
lw_str_Attrib = Inputs.GetProperty("Attribute_Value");
lw_str_Expresion = Inputs.GetProperty("Expresion");lw_array_Attrib = lw_str_Attrib.split(",");


for (var i=0; i < lw_array_Attrib.length; i++)
{
lw_array_AttribValue = lw_array_Attrib[i].split(":");
lw_str_AttrName =lw_array_AttribValue[0];
lw_str_Condition = lw_array_AttribValue[1]
lw_str_AttrValueEval = lw_array_AttribValue[2];
if (!isNaN(lw_str_AttrValueEval))
{
ToInteger(lw_str_AttrValueEval);
}with (lw_obj_bc_XA)
{
SetViewMode(AllView);
ClearToQuery();
lw_str_Qry = "[Object Id] = '" + lw_str_ItemId + "' AND [Name] = '" + lw_str_AttrName + "'";SetSearchExpr(lw_str_Qry);
ExecuteQuery(ForwardOnly);
lw_str_isRecord = FirstRecord();
} //end with

if (lw_str_isRecord) // attrib found
{
lw_str_AttrValueReal =...
tracking img