Jump to content

pacy99

Members
  • Content Count

    23
  • Joined

  • Last visited

  • Days Won

    1

pacy99 last won the day on April 9

pacy99 had the most liked content!

Community Reputation

2 Neutral

About pacy99

  • Rank
    Level 2 Contributor
  • Birthday 07/01/1973

Profile Information

  • Gender
    Male
  • Location
    fth/nbg/germany

Recent Profile Visitors

439 profile views
  1. for initial load of update_lrel_xxx form find this area in list_nr.htmpl: <PDM_IF "$args.KEEP.ForLrel" == "1"> document.write('<input type="hidden" name="HTMPL" value="update_lrel_nr.htmpl">'); and add document.write('<input type="hidden" name="KEEP.RowsPerPage" value="100">'); in update_lrel_xxx you can Change all links in loadActions() with this: jq("[id^=dx_]").each(function() { jq(this).attr("href", jq(this).attr("href") + "+KEEP.RowsPerPage=100"); }); regards, pacy
  2. your url only invokes a request to do a search on records in pcat factory. the resultset will normally shown in the corresponding form (in this case: list_pcat.htmpl). if you provide the url parameter HTMPL, you can force an other form to show the resultset. of course this form must be in position to show this kind of resultset. as far as i know, in HTMPL only form names are valid. but furthermore, if your function would be called, you would still have the problem that the answer from webengine is a html file which contains your resultset. i don't know a solution for your problem without doing a lot of more customization....much more to describe here... but maybe some of the gods of sdm here in this forum know a cheap and easy to realize trick... sry guy!
  3. assuming done_by is filled up with something, you can try to use send_wait(0, chg_dob, "call_attr", "assignee", "set_val", done_by, "SURE_SET"); instead of chg_dob.assignee=done_by;
  4. display_new_page is used like that: display_new_page(cfgCgi + "?SID=" + cfgSID + "+FID=" + fid_generator() + "+OP=SEARCH" + "+FACTORY=pcat" + "+ADDITIONAL_WHERE=sym='the category name'" ); but, what do you want to achieve? pacy
  5. hi, i think you can use $args.prop0.value to $args.prop22.value. greetings pacy
  6. hi *, - copy file ahdtop_site.htmpl from NX_ROOT/bopcfg/www/htmpl/default to NX_ROOT/site/mods/www/htmpl/default (if not already present) - add a new variable: var loginUserRoleName = "$LOGIN_USER_ROLE.name"; - create file sitemods.js in NX_ROOT/site/mods/www/wwwroot/scripts (if not already present) - copy "function setWindowTitle(title, no_write) { ..... }" from NX_ROOT/sdk/scripts/window_manager.js to sitemods.js - add code to the function: ... } title = title + " - " + ahdtop.loginUserRoleName; // add this line title=title.replace(/'/g,"'"); ... - clear browser cache greetings pacy
  7. hi JESI, you can use some code like this: zcreate_cr(string desc) { string mth; mth = "zcreate_cr()"; object gl, cr_dob; // get gl send_wait(0, top_object(), "get_co_group"); if(msg_error()){ logf(ERROR, "%s: error on get gl - %s", mth, msg[0]); return; } gl = msg[0]; // create ticket send_wait( 0, top_object(), "call_attr", "cr", "get_new_dob", NULL, NULL, gl); if (msg_error()) { logf(ERROR, "%s: error on create ticket - %s", mth, msg[0]); return; } cr_dob = msg[0]; // init ticket send_wait( 0, cr_dob, "init_call_request", (uuid)NULL, // ? (uuid)"934C27C0EAE901DEB23D000C29345EC9", // activity creating user uuid "Command Line created Ticket."); // ticket init activity text if (msg_error()) { logf(ERROR, "%s: error on init ticket - %s", mth, msg[0]); return; } // provide tickets vals cr_dob.category = "pcat:382919736"; cr_dob.group = (uuid)"2603C340388633519AF74F07B8EF7802"; cr_dob.description= desc; // our system needs values for some additional required fields cr_dob.summary = "sum"; cr_dob.customer = (uuid)"934C27C0EAE901DEB23D000C29345EC9"; // checkin send_wait(0, gl, "checkin"); if (msg_error()) { int i; // loop to get all information about possible problems on checkin for(i = 0; i < msg_length(); i++) { logf(ERROR, "%s: error on checkin - msg[%d] = %s", mth, i, msg[i]); } return; } } if you put this in a file "new_cr.frg", you can call this with: bop_cmd -f new_cr.frg "zcreate_cr("""my ticket description""")" if this is not enough for you, you could have an additional look into NX_ROOT/samples/call_mgt/gencr.frg & gencr_readme.txt greetings, pacy
  8. @ anthony: i think, there is a problem in your cmdbNotebook.htmpl. could you post the source, so we can have a look on it? regards pacy
  9. hi, try a: pdm_extract -f "select description, group_id, id, persid, service_type, sym FROM Prob_Category WHERE group_id=U'49089F2AAD9F794EBC5EEDAEBEDC1A49'" > prob_ctg_grp.txt greetz pacy
  10. hi, yes, if u have a sql db, use a sqlbuild -v -C -p <tablename> <dbname> <path to ddict.sch> if u use oracle, orclbuild -v -C -p <tablename> <dbname> <path to ddict.sch> would be the right choice. use of backslashes or slashes in path parameters is depending on the operating system where you enter the command. use slashes on unix/linux, use backslashes on windows (if your os is w2k3 or greater, i think u can use both versions on windows) greetz pacy
  11. hi, use a send_wait( 0, incidencia, "init_call_request", (uuid)"log agent id", (uuid)"customer id", "incident description"); before you checkin the ticket. don't set the type (this is already done by get_new_dob on factory in); don't try to set ref_num by yourself, init_call_request will do this fine. you don't have to set open_date, last_mod_dt, active, too. regards pacy
  12. hi, this will work for r12.5: - generate file ciattmnts.sch in site/mods: CODE TABLE usp_lrel_attachments_assets { id INTEGER UNIQUE KEY; nr UUID REF ca_owned_resource; attmnt INTEGER REF Attachment; last_mod_dt LOCAL_TIME; last_mod_by UUID REF ca_contact; tenant UUID REF ca_tenant; } p1 usp_lrel_attachments_assets -> CURR_PROV usp_lrel_attachments_assets; TABLE_INFO usp_lrel_attachments_assets { INDEX SORT ASCENDING nr; INDEX SORT ASCENDING attmnt; INDEX SORT ASCENDING tenant; INDEX SORT ASCENDING UNIQUE ( ORDER_BY ) nr attmnt ; } - do something to merge your schema (pdm_configure or something else) - type this command in directory site/mods/: sqlbuild -vCp usp_lrel_attachments_assets mdb ..\ddict.sch (use slashes if unix, use orclbuidl & mdbadmin instead of mdb if oracle db) - generate file zciattmnts.maj in site/mods/majic: CODE OBJECT lrel_attachments_assets { TENANT_OPTIONAL; ATTRIBUTES usp_lrel_attachments_assets { attmnt SREL attmnt REQUIRED; nr SREL nr REQUIRED; login_id LOCAL STRING { ON_CI SET USER ; } ; last_mod_dt DATE { ON_CI SET NOW; }; last_mod_by SREL cnt TENANCY_UNRESTRICTED { ON_NEW DEFAULT USER; ON_CI SET USER; }; }; FACTORY { STANDARD_LISTS { SORT_BY "attmnt=attmnt.created_dt, nr=nr.name"; MLIST OFF; RLIST OFF; }; REL_ATTR id ; UI_INFO "NOLOOKUP"; FUNCTION_GROUP "reference" ; }; TRIGGERS { POST_CI Insert_Activity(nr, login_id ) 50 FILTER (EVENT("INSERT")) ; POST_CI Delete_Activity(nr, login_id ) 55 FILTER (EVENT("DELETE")) ; POST_CI decrement_attmnt_usage (attmnt, nr) 60 FILTER (EVENT("DELETE")) ; POST_CI update_links(attmnt) 65 FILTER (EVENT("INSERT")) ; }; }; OBJECT nr { ATTRIBUTES ca_owned_resource { attachments BREL lrel_attachments_assets nr { LREL attmnt; } ; } ; } ; - generate file zciattmnts.spl in site/mods/majic: CODE lrel_attachments_assets::Insert_Activity(...) { int debug; string method; debug = 0; method = "lrel_attachments_assets::Insert_Activity()"; if(debug) logf(SIGNIFICANT, "%s: start.", method); object groupleader, cialg_dob, nr_dob; string wc; int i; uuid userid; if(debug) { for(i = 0; i < argc; i++) { logf(SIGNIFICANT, "%s: argv[%d] = %s", method, i, argv); } } // get a groupleader send_wait(0, top_object(), "get_co_group"); if(msg_error()) { logf(ERROR, "%s: can't get a group leader. msg[0] = ", msg[0]); return; } groupleader = msg[0]; // get nr dob send_wait(0, top_object(), "call_attr", "nr", "dob_by_id", 0, argv[3], "nr"); if(msg_error()) { logf(ERROR, "%s: can't get nr dob. msg[0] = ", msg[0]); return; } nr_dob = msg[0]; // get userid send_wait(0, top_object(), "call_attr", "cr", "current_user_id"); if(msg_error()) { logf(ERROR, "%s: can't get current user id. msg[0] = ", msg[0]); return; } userid = msg[0]; // generate alg entry cialg_dob = call("cialg::make_actlog_entry", groupleader, nr_dob, (duration)NULL, now(), userid, "Attach Document", "ATTACHTDOC", "Attach Document", (string)NULL, (string)NULL, (string)NULL); // checkin da whole shice send_wait(0, groupleader, "checkin"); if(msg_error()) { logf(ERROR, "%s: can't checkin. msg[0] = ", msg[0]); return; } if(debug) logf(SIGNIFICANT, "%s: end.", method); return; } lrel_attachments_assets::Delete_Activity(...) { int debug; string method; debug = 0; method = "lrel_attachments_assets::Delete_Activity()"; if(debug) logf(SIGNIFICANT, "%s: start.", method); object groupleader, cialg_dob, nr_dob; string wc; int i; uuid userid; if(debug) { for(i = 0; i < argc; i++) { logf(SIGNIFICANT, "%s: argv[%d] = %s", method, i, argv); } } // get a groupleader send_wait(0, top_object(), "get_co_group"); if(msg_error()) { logf(ERROR, "%s: can't get a group leader. msg[0] = ", msg[0]); return; } groupleader = msg[0]; // get nr dob send_wait(0, top_object(), "call_attr", "nr", "dob_by_id", 0, argv[3], "nr"); if(msg_error()) { logf(ERROR, "%s: can't get nr dob. msg[0] = ", msg[0]); return; } nr_dob = msg[0]; // get userid send_wait(0, top_object(), "call_attr", "cr", "current_user_id"); if(msg_error()) { logf(ERROR, "%s: can't get current user id. msg[0] = ", msg[0]); return; } userid = msg[0]; // generate alg entry cialg_dob = call("cialg::make_actlog_entry", groupleader, nr_dob, (duration)NULL, now(), userid, "Detach Document", "DETACHTDOC", "Detach Document", (string)NULL, (string)NULL, (string)NULL); // checkin da whole shice send_wait(0, groupleader, "checkin"); if(msg_error()) { logf(ERROR, "%s: can't checkin. msg[0] = ", msg[0]); return; } if(debug) logf(SIGNIFICANT, "%s: end.", method); return; } lrel_attachments_assets::decrement_attmnt_usage(...) { int debug; string method; debug = 0; method = "lrel_attachments_assets::decrement_attmnt_usage()"; if(debug) logf(SIGNIFICANT, "%s: start.", method); object groupleader, attmnt_dob; int i, attmnt_id; string wc; if(debug) { for(i = 0; i < argc; i++) { logf(SIGNIFICANT, "%s: argv[%d] = %s", method, i, argv); } } // get a groupleader send_wait(0, top_object(), "get_co_group"); if(msg_error()) { logf(ERROR, "%s: can't get a group leader. msg[0] = ", msg[0]); return; } groupleader = msg[0]; // get attmnt dob attmnt_id = argv[3]; send_wait(0, top_object(), "call_attr", "attmnt", "dob_by_id", 0, attmnt_id, NULL); if(msg_error()) { logf(ERROR, "%s: can't do dob_by_id for attmnt. msg[0] = ", msg[0]); return; } attmnt_dob = msg[0]; // checkout attmnt send_wait(0, groupleader, "checkout", attmnt_dob); if(msg_error()) { logf(ERROR, "%s: can't checkout attmnt. msg[0] = ", msg[0]); return; } // delete attmnt send_wait(0, attmnt_dob, "dob_mark_delete"); if(msg_error()) { logf(ERROR, "%s: failure on delete attmnt. msg[0] = ", msg[0]); return; } send_wait(0, groupleader, "checkin"); if(msg_error()) { logf(ERROR, "%s: error on checkin. msg[0] = ", msg[0]); return; } if(debug) logf(SIGNIFICANT, "%s: end.", method); return; } lrel_attachments_assets::update_links(...) { int debug; string method; debug = 0; method = "lrel_attachments_assets::update_links()"; if(debug) logf(SIGNIFICANT, "%s: start.", method); int i, attmnt_id; object attmnt_dob; if(debug) { for(i = 0; i < argc; i++) { logf(SIGNIFICANT, "%s: argv[%d] = %s", method, i, argv); } } // get attmnt dob attmnt_id = argv[3]; send_wait(0, top_object(), "call_attr", "attmnt", "dob_by_id", 0, attmnt_id, NULL); if(msg_error()) { logf(ERROR, "%s: can't do dob_by_id for attmnt. msg[0] = ", msg[0]); return; } attmnt_dob = msg[0]; // reset attr init triggers send(attmnt_dob, "reset_attr_init_triggers", 2, "attached_persid", "attached_name"); if(msg_error()) { logf(ERROR, "%s: can't reset attr init triggers for attmnt. msg[0] = ", msg[0]); return; } if(debug) logf(SIGNIFICANT, "%s: end.", method); return; } - find file cmdbNotebook.htmpl in bopcfg/www/htmpl/web/analyst; copy this file to site/mods/www/htmpl/web/analyst and put the following lines in, where you want to have your attachments register in asset mask: <PDM_IF "$args.id" == "0"> <PDM_TAB name="Attachments" src="OP=SHOW_DETAIL+HTMPL=xx_attmnt_tab.htmpl+FACTORY=nr+PERSID=$args.persistent_id+NO_DP=yes" id=attmnt height=300></pdm_tab> <PDM_ELSE> <PDM_TAB name="Attachments" src="OP=SHOW_DETAIL+HTMPL=xx_attmnt_tab.htmpl+FACTORY=nr+PERSID=$args.persistent_id+SDBP_FLAG=1" id=attmnt height=300></pdm_tab> </PDM_IF> - find file xx_attmnt_tab.htmpl in bopcfg/www/htmpl/web/analyst; copy this file to site/mods/www/htmpl/web/analyst and find the following lines: switch ("$prop.factory") { case "cr": attmntAccess = "${ACCESS.FAC_cr:0}" - 0; break; case "iss": attmntAccess = "${ACCESS.FAC_iss:0}" - 0; break; case "chg": attmntAccess = "${ACCESS.FAC_chg:0}" - 0; break; } - change the lines to: switch ("$prop.factory") { case "cr": attmntAccess = "${ACCESS.FAC_cr:0}" - 0; break; case "iss": attmntAccess = "${ACCESS.FAC_iss:0}" - 0; break; case "chg": attmntAccess = "${ACCESS.FAC_chg:0}" - 0; break; case "nr": attmntAccess = "${ACCESS.FAC_nr:0}" - 0; break; } - restart services that's it. warning: this is not really tested greetz pacy
  13. hi, $args.category.sym instead of $args.category.code. pacy
  14. hi, the sorting is based on the UUID's of the locations. this is a known issue, dunno if there is a patch to fix this. greetz pacy
×
×
  • Create New...