Is there any out-of-the-box Business Rule for the Company field on the Task table?

CAO
Tera Contributor

I know that there is a Company field on the Task table.

When I create an Incident and set the Caller, the Company field on the Task table is automatically populated based on the Caller’s company.

However, I could not find any out-of-the-box Business Rule that sets the Company field on the Task table.

Could anyone explain how this field is being populated, or where this logic is implemented?

1 ACCEPTED SOLUTION

TejasSN_LogicX
Tera Contributor

Hi @CAO  ,

The Company field on the Task (and Incident) form is populated automatically because of dot-walking, not because of a Business Rule.

The Caller field caller_id is a reference to the User [sys_user] table.

In the form layout (and dictionary setup), the Company field is dot-walked from caller_id.company.

 

TejasSN_LogicX_0-1767928120957.png

TejasSN_LogicX_1-1767928154494.png

 

aslo you can check the default value configuration for the company field 

right click on the field -> configure dictionary 

TejasSN_LogicX_2-1767928229619.png

 

 

 

Glad I could help! If this solved your issue, kindly mark my reply as the accepted solution & hit the thumbs up.

 

Regards,
Tejas

 

 

 

 

 

View solution in original post

4 REPLIES 4

TejasSN_LogicX
Tera Contributor

Hi @CAO  ,

The Company field on the Task (and Incident) form is populated automatically because of dot-walking, not because of a Business Rule.

The Caller field caller_id is a reference to the User [sys_user] table.

In the form layout (and dictionary setup), the Company field is dot-walked from caller_id.company.

 

TejasSN_LogicX_0-1767928120957.png

TejasSN_LogicX_1-1767928154494.png

 

aslo you can check the default value configuration for the company field 

right click on the field -> configure dictionary 

TejasSN_LogicX_2-1767928229619.png

 

 

 

Glad I could help! If this solved your issue, kindly mark my reply as the accepted solution & hit the thumbs up.

 

Regards,
Tejas

 

 

 

 

 

 Hii @TejasSN_LogicX  but

After changing the user/caller  the company  remains same why ??
and second question I can see value in company field after save only ,not as soon as , I select the caller. .

VaishnaviK43271
Tera Contributor

Hi @CAO !!

This is out-of-the-box behavior and it is not handled by a Business Rule.

The Company field on Task / Incident is populated using an OOTB Data Lookup Definition.

When you select the Caller, ServiceNow automatically looks at the Caller’s Company and sets the Task.company field based on that value.

You can find this logic here:
System Policy → Data Lookup Definitions

ServiceNow uses Data Lookups instead of Business Rules because they are:

  • Declarative (no scripting)

  • Executed early in record creation

  • Easier to maintain and extend

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for.

 

Regards,

Vaishnavi 

VaishnaviK43271
Tera Contributor

Hi @CAO !!

 

After re-checking this in my PDI, this behavior is not implemented using a Data Lookup Definition.

OOTB, the Company field on Incident (and inherited from Task) is populated by an out-of-the-box Business Rule on the Incident table.

The Business Rule:

  • Runs on Insert and Update

  • Checks that Caller is not empty and Company is empty

  • Sets:

Incident.company = Caller.company

This is configured using the Set field values option (no scripting).

VaishnaviK43271_0-1767971340533.png

VaishnaviK43271_1-1767971358558.png

 

Mark this as Helpful if it clarifies the issue.
Accept the solution if this answers your question.

Regards,
Vaishnavi
Associate Technical Consultant