Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

HR Lifecycle Event: Upload user photo from File Upload activity type

valter479
Tera Contributor

I have activity on the lifecycle event for new hire to upload photo for user profile. How can I update user profile photo after activity completed.

 

I tried having a flow that gets trigger after the HR task (photo activity) is completed which does the following:

  1. Copy attachment from HR task to sys_user record
  2. Update "Name" field on the new copy attachment record to "photo"
  3. Update "Table name" field on the new copy attachment record to "ZZ_YYsys_user"

This display the photo on the sys_user record but not on the portal

 

I also trying using the same flow to update the "live_profile" record.

 

What am I missing to display on the portal.

 

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@valter479 If the steps you mentioned are not working then you can try the following steps too.

1. Try creating an entry in the live_profile table

2. Copy attachment from the HR Task to live profile

3. Photo field on the live profile record should store the sys_id of the photo stored in the attachment table

 

Here is how your live profile record should look.

Screenshot 2023-12-22 at 11.49.33 PM.png

The photo field on your live_profile should have the sys_id of photo stored in sys_attachment table

Screenshot 2023-12-22 at 11.45.26 PM.png

This how your record should appear in the attachment table.

Screenshot 2023-12-22 at 11.46.01 PM.png

Hope this helps.

View solution in original post

4 REPLIES 4

Sandeep Rajput
Tera Patron
Tera Patron

@valter479 If the steps you mentioned are not working then you can try the following steps too.

1. Try creating an entry in the live_profile table

2. Copy attachment from the HR Task to live profile

3. Photo field on the live profile record should store the sys_id of the photo stored in the attachment table

 

Here is how your live profile record should look.

Screenshot 2023-12-22 at 11.49.33 PM.png

The photo field on your live_profile should have the sys_id of photo stored in sys_attachment table

Screenshot 2023-12-22 at 11.45.26 PM.png

This how your record should appear in the attachment table.

Screenshot 2023-12-22 at 11.46.01 PM.png

Hope this helps.

Hi @Sandeep Rajput,

 

I tried on my PDI, it didn't work

 

Live Profile record:

<xml>
<live_profile>
<document>ca6a9fd247177110df624db3416d43d4</document>
<follower_count/>
<following_count/>
<image/>
<joined_feed>false</joined_feed>
<name>test test</name>
<photo>58a2af1a47577110df624db3416d4399</photo>
<short_description/>
<status/>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2023-12-26 13:23:50</sys_created_on>
<sys_domain>global</sys_domain>
<sys_domain_path>/</sys_domain_path>
<sys_id>449ad75647177110df624db3416d438f</sys_id>
<sys_mod_count>5</sys_mod_count>
<sys_updated_by>system</sys_updated_by>
<sys_updated_on>2023-12-26 13:57:05</sys_updated_on>
<table>sys_user</table>
<type>user</type>
</live_profile>
</xml>

 

Attachment record:

attachmentRecord.png

 

I also tried changing the file name to "photo" on the attachment record to match the property/field on the live profile table. That also didn't work.

Hi @Sandeep Rajput,

 

Ignore my last comment. It works by updating the live profile record. When I tested the first time by impersonate the user, it didn't show the photo. Today  I impersonate the same user and it is showing. I think something was cache when I impersonated the user first time.

 

Thanks. 

 

 

Glad to know that it worked for you Valter.