I'm using the following formula with "Case" entity and Trigger type: After record saved:
	
A case description might look like this:
	
		
This does add "644a42027d091dd82" in the correct place, but it does not lookup or link correctly. If I update the case manually it does however reapply the link and it works as expected. What am I missing?
 
		
							
						
					PHP Code:
	
$message = (description);
$apartmentidLine = string\match($message, '/LägenhetsID\: (.*)$/m');
$apartmentid = string\substring($apartmentidLine, 13);
realEstatePropertyId = $apartmentid; 
			
			
			
				Description:
Test!
LägenhetsID: 644a42027d091dd82
	Test!
LägenhetsID: 644a42027d091dd82
This does add "644a42027d091dd82" in the correct place, but it does not lookup or link correctly. If I update the case manually it does however reapply the link and it works as expected. What am I missing?

Comment