Jump to content

Chance cr ticket status from a custom form


Recommended Posts

Hello Guys.

I created an object to trigger the supplier and their respective forms.

Now I need that from this new form z_xxxx I can change the status of a ticket in the CR.

document.write('<input type="hidden" name="SET.cr.status" value="AWTVNDR">');

 

How can I change a ticket status from a z_.. form?

Link to post
Share on other sites
10 hours ago, mrjoaoulisses said:

Hello Guys.

I created an object to trigger the supplier and their respective forms.

Now I need that from this new form z_xxxx I can change the status of a ticket in the CR.

document.write('<input type="hidden" name="SET.cr.status" value="AWTVNDR">');

 

How can I change a ticket status from a z_.. form?

 

I think it can certainly easier, but I chose a function because I can use conditions and it´s reusable

 

function zsetstatus() {
    if......
	document.main_form.elements["SET.status"].value = "AWTVNDR";
}

Body onload:

<body class="detailro" onload='loadActions();zsetstatus();' onunload="unloadActions()">

Only for new Tickets

<body class="detailro" onload='loadActions();<PDM_IF "$args.id" == "0">zsetstatus();</PDM_IF>' onunload="unloadActions()">

 

Just re-read your question and i don´t think it is the correct answer of your question... sorry

Edited by henning1518
Link to post
Share on other sites

to update something, first of all, you need to open that object for edit, acquire edit session, the process is called checkout, URL sample: OP=UPDATE+FACTORY=CR+PERSID=cr:1234

if you're have that session, you can post some changes using inputs, eg: `<input name="SET.some_attr" value="someValue" />`, and then click save (checkin)

looking at your code sample you're opening some object that has cr reference, no cr itself, so you can't edit cr in that way, but you can use workarounds:

- perform http query to edit cr (ajax for example)

- use spel (add trigger to object you edit, and when it triggers checkout, update and checkin cr you want);

- use webengine op, most advanced method which allows you control the whole process.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...