Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Trying to send Reclaim Asset Record Producer Values fr Rule, and it creates RITM not ARR Record?

jlaps
Kilo Sage

Trying to generate a Reclaim Asset record from a business rule that is using the Offboard RITM as a trigger. I tried the cart option, but it created a RITM instead of ARR record, and thereby skipped all the subsequent stuff that is supposed to happen.

 

How to I use a record producer from a business rule and have it create the correct record type instead of a RITM?

 

I apologize if this is a simple question, but no matter how I craft the keywords, not getting correct hits on searching.

2 REPLIES 2

Sarthak Kashyap
Mega Sage

Hi @jlaps ,

 

If you want to create a record on your Reclaim Asset table when you submit a catalog item, then I think if you use record producer and on your Reclaim Asset table it will create a record on your Reclaim Asset only and you can also able to map the fields from your question variables.

 

SarthakKashyap_0-1763150776469.png

 You can configure variables like

SarthakKashyap_1-1763150865960.png

 

And I don't think you can call Record producer from BR, you can access the variables of RP in BR

Check link - https://www.servicenow.com/community/developer-forum/access-variables-of-record-producer-from-busine...

 

Let me know if you need more help!

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards,

Sarthak

jlaps
Kilo Sage

I am not following the above. More detail on situation I am trying to solve for.

 

Offboard RITM gets created from existing process for a user leaving. This happens automatically.

 

CURRENT- We have a rule watching for these offboard RITM, and when it sees one, it creates an ASSET RECOVERY RITM (using cart method) for that same user, pulling in some data from the RITM variables of the offboard, and finally attaches the Asset Recovery RITM the parent of same REQ as the Offboard RITM.

 

We are implementing HAM Pro now, and are doing away with the ASSET RECOVERY RITM, and are using the Reclaim Asset (record producer) in HAM Pro. I am trying to replace the auto generation of the old Asset Recovery RITM with the new Reclaim Asset ARRxxxxx request, which has the entire process underneath it.

 

I am not seeing a way to create these ARR requests other than manually using the record producer.

 

I need to automate the creation of the ARR while being able to reference the values in the Offboard RITM (terminated user, location to determine ship or drop off, etc etc). This is apparently not like an incident record producer as there are no fields, just variables. I cannot seem to use the Cart method as it, for some reason, creates a RITM instead of an ARR.

 

I tried this-

var item = cart.addItem('1297d75ba1617010fa9b20d39126489f'); //catalog item sysid - Reclaim Asset
	cart.setVariable(item, 'requested_by', 'hr');
    cart.setVariable(item, 'requested_for', current.variables.termination_user);
    cart.setVariable(item, 'reclaim_date', current.variables.terminationTime);
		if (current.termina.location.indexOf('remote') > -1) {
			cart.setVariable(item, 'reclaim_method', 'ship');
		}else{
			cart.setVariable(item, 'reclaim_method', 'drop_off');
		}
    current.update();
    var rc = cart.placeOrder();

And it creates a RITM which is no good as it does not start the reclamation process (not ARR record). I likewise cannot initialize an ARR since there are not fields, but variables. It seems like there should be something easy to connect the dots here, but I can't find it.