---
sourceDocument: 브라질 워크플로우 데이터 패브릭
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ko-KR/integrate-applications

 Release :

    - brazil

ft:locale :

    - ko-KR

ft:publication_title :

    - 브라질 워크플로우 데이터 패브릭

ft:clusterId :

    - crint

bundleId :

    - crint

workflow :

    - Creator


---

# onBefore 스크립트를 변환 맵에 추가합니다.

# onBefore 스크립트를 변환 맵에 추가합니다. {#ariaid-title1}

릴리스 버전: Brazil  
업데이트 날짜 2026년 09월 10일  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 소요 시간: 1분  
원본에서 대상 인스턴스로 새 기록 sys_id 복사하는 onBefore 변환 맵 스크립트를 만듭니다. 두 번째 onBefore 변환 맵 스크립트를 만들어 대상 인스턴스에서 고유 값은 같지만 sys_id 값은 다른 기록을 식별합니다.

## 시작하기 전에

필요한 역할: admin.

## 프로시저

1. 생성한 테이블 변환 맵 기록을 엽니다.
2. 변환 스크립트 관련 목록에서 신규를 클릭합니다.
3. 시기 필드에서 onBefore를 선택합니다.
4. 다음 스크립트를 입력합니다.  

       if (action == "insert") {target.setNewGuidValue(source.u_sys_id); }

5. 제출을 클릭합니다.
6. 변환 스크립트 관련 목록에서 신규를 클릭합니다.
7. 시기 필드에서 onBefore를 선택합니다.
8. 다음 스크립트를 입력합니다.  

       /** 
       * This script queries for a uniquely identifying value of the referenced record and then 
       * updates the target reference field with the sys_id of the matching target record.
       * This sample assumes:
       * 1) The target table contains an assigned_to field which is a reference field.
       * 2) The reference field references the User [sys_user] table.
       * 3) You can use the email field to uniquely identify users. Alternatively you
       *    could use the user_name field.
       */
       var ref = new GlideRecord("sys_user"); //Replace sys_user with any reference table
       ref.addQuery("email", source.email); //Replace email with any unique field
       ref.query();
       if(ref.next()){
          target.assigned_to = ref.sys_id; //Replace assigned_to with any reference field
       }

9. 제출을 클릭합니다.
**이전 주제:** [변환 맵 생성](https://servicenow-prod.fluidtopics.net/j44~jF2gL3fyqE5PFmWpDQ "변환 맵은 임포트 세트의 필드와 기존 ServiceNow 테이블(예: 인시던트 [incident] 또는 사용자 [sys_user])의 필드 간 관계를 결정하는 일련의 필드 맵입니다.")  
**다음 주제:** [CSV 형식 파일에서 데이터 검색](https://servicenow-prod.fluidtopics.net/V2sNr3y0CZCYON3eKivJ_g "이 방법에서는 HTTPS 데이터 소스를 사용하여 다른 인스턴스에서 데이터를 임포트하여 임포트할 행이 포함된 CSV 형식 파일을 반환합니다.")

