Need to update Opened By in RITM via REST API

Sheveta
Giga Contributor

Hi,

I have created a REST API which is a POST API, and it will create the RITM data in Requested Items list. With these items I need to pass the Opened by name of the person logged in. When I tried to modify the API by adding the "opened_by" field it takes the default system administrator.

Any leads to resolve this will be highly appreciated.

Thanks

14 REPLIES 14

Sheveta
Giga Contributor

Hi dvp,

 

Yes I'm using admin account.

 

Thanks

Do you have a variable called opened_by ?

If not you have to create one and then map it

ALso, in obj.opened_by, are you receiving sys_id in opened_by variable

Sheveta
Giga Contributor

Not i don't have a variable called opened_by, I wanted to use the in built Opened By field instead of creating a new one.

rajneeshbaranwa
Giga Guru

Currently default value for Opened_By field is javascript:gs.getUserID().

You need to override this for sc_req_item table and make default value blank but if you do that all your workflow/client script  needs to be changed to mark default value as gs.getUserID(). This could be really tedious if you have many workflows in your instance.

Hi,

I created a custom field on the RITM table as :Opened By", still the error persists. Could you please let me know from where can I remove the default sys admin value on "Opened By" field which is OOTB.

Thanks