How to use autosysfields(false)

Santhosh23
Tera Expert

How to use autosysfields(false) for the records updating via glidesysattachment.copy method.

6 REPLIES 6

MrMuhammad
Giga Sage

Hi, 

If you are using GlideRecord to find the taget table name and target record sys_id then it would be something like below.

GlideRecordObject.autoSysFields(false);

Replace with GlideRecordObject actual object.

Thanks,

Sharjeel

Regards,
Muhammad

Yash Agrawal1
Tera Guru

Hello Santosh,

var gr = new GlideRecord('sc_request');

gr.addQuery('active','true');

gr.addQuery('state', 7);

gr.query();

while (gr.next())

{

gr.setWorkflow(false);

gr.autoSysFields(false);

gr.setValue ('active', 'false');

gr.update();
}

If you want to update record but not want to update its system fields like updated and updated by the use

gr.autoSysFields(false); 

Please Mark it helpful/correct if my answer helps in any way to resolve your query.
Reach out to me if any more help required.

Regards

Yash.K.Agrawal

Hello Santosh,

Thankyou for marking answer as Helpful.

Do you want more help on this?

If no,then will you please mark my answer as CORRECT also and close the thread,it will help others also ,who. are sesrching for same kind of assistance.

Regards

Yash Agrawal

Heelo Santosh,

If you query is solved will you please close the thread by marking my answer as CORRECT .

If you want any more help then please keep posted

REGARDS

YASH AGRAWAL