File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
OFM.Infrastructure.Plugins/Account Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,23 @@ protected override void ExecuteDataversePlugin(ILocalPluginContext localPluginCo
78
78
if ( preImageAccount . GetAttributeValue < OptionSetValue > ( "ccof_accounttype" ) . Value == ( int ) ccof_AccountType . Organization &&
79
79
preImageAccount . GetAttributeValue < string > ( "address1_composite" ) != postImageAccount . GetAttributeValue < string > ( "address1_composite" ) )
80
80
{
81
- applicationUpdate [ "ofm_previous_organization_address" ] = preImageAccount . GetAttributeValue < string > ( "address1_composite" ) ;
81
+ var addressString = string . Empty ;
82
+ addressString += preImageAccount . GetAttributeValue < string > ( "address1_line1" ) ;
83
+ if ( preImageAccount . GetAttributeValue < string > ( "address1_line2" ) != null )
84
+ {
85
+ addressString += ", " + preImageAccount . GetAttributeValue < string > ( "address1_line2" ) + ", "
86
+ + preImageAccount . GetAttributeValue < string > ( "address1_city" ) + ", "
87
+ + preImageAccount . GetAttributeValue < string > ( "address1_stateorprovince" ) + " "
88
+ + preImageAccount . GetAttributeValue < string > ( "address1_postalcode" ) ;
89
+ }
90
+ else
91
+ {
92
+ addressString += ", " + preImageAccount . GetAttributeValue < string > ( "address1_city" ) + ", "
93
+ + preImageAccount . GetAttributeValue < string > ( "address1_stateorprovince" ) + " "
94
+ + preImageAccount . GetAttributeValue < string > ( "address1_postalcode" ) ;
95
+ }
96
+
97
+ applicationUpdate [ "ofm_previous_organization_address" ] = addressString ;
82
98
updateRequired = true ;
83
99
}
84
100
You can’t perform that action at this time.
0 commit comments