cancel
Showing results for 
Search instead for 
Did you mean: 

Extension Field On OWL Not Updating Properly

former_member183363
Active Contributor
0 Kudos

Hello everyone,

I've added minor enhancements to two OWLs --- the Accounts screen and the Contacts screen --- which aren't quite behaving as expected. These two fields show the name of the person listed as 'Employee Responsible --- Sales' in the account, so that both on the account and any contacts listed for that account the name of the employee responsible for that account is shown in that particular row.

However, there's a slight issue. When I go into the account screen, go to Contacts > Responsibilities and just CHANGE the employee listed in the 'Employee Responsible --- Sales' row then save and close, the extension field on the OWL doesn't update on the Accounts screen...but it does on the Contacts OWL. However, if I go into the account, DELETE the employee responsible entry, save and close, then go back in and re-add the row with the desired new name, the Accounts screen updates just fine.

I'm not sure why this is as the two extension fields are written to using the same data in the same manner. I'll include screenshots below; as always, any help would be appreciated.

Figure 1: my script. 'emp.Employee.CurrentCommon.BusinessPartnerFormattedName' is the source name to show in the OWLs; this.CurrentCommon.zAccountOwnerForAccountsOWL' is the extension field on the Accounts screen; contact.RelationshipBusinessPartner.CurrentCommon.zEmployeeResponsibleSalesContactsOWL' is the extension field on the Contacts screen.

Figure 2: the Accounts > Contacts > Responsibilities screen. Here, if I merely change the employee listed in the existing 'Employee Responsible - Sales' entry using the OVS, the extension field on the Accounts OWL isn't updated despite variable 'name2' showing the name of the new person; the extension field on the Contacts OWL however does update.

Figure 3: as with figure 2, this is the Contacts > Responsibilities screen. If I delete the employee responsible entry, save and close, then go back in and add a new row for employee responsible as in this image, then save and close again, the extension field on the Accounts OWL does update.

Lewis

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member183363
Active Contributor
0 Kudos

Bump.

Former Member
0 Kudos

Hello Lewis,

I think if you get name2 in your coding as set correctly, something is changed after the AfterModify event, eventually the CurrentCommon is rewritten.

I'd try the BeforeSave event instead of AfterModify.

Best regards,

Leonid