Reputation: 1
I have a situation where the newcontactpopup is expecting a return value of Type contact and the actual button in screen(Disbursementcontactscreen) is toolbar button which has actionproperty but not pickvalue. As the main newcontactpopup is expecting a returntype contact and toolbar button doesn't have pickvalue
We are getting error when user tries to enter disbursementcontact details in Disbursementdetaildv.pcf and click update as it doesn't have pickvalue it is throwing them error. below is the code in disbursementdetaildv.pcf
<RangeInput
conversionExpression="PickedValue.Contact"
editable="true"
id="contactName_SP"
label="DisplayKey.get("SP.TransactionApproval.Web.DisbursementDetailScreen.ContactName")"
onPick="disbursement.markThisDisbursementToGivenContact_sp(PickedValue.Contact)"
value="disbursement.Contact_SP"
valueRange="disbursement.ContactNameValueRange_SP"
valueType="entity.Contact"
visible="useContacts_SP">
<PostOnChange
onChange="disbursement.markThisDisbursementToGivenContact_sp(disbursement.Contact_SP)"/>
<MenuItem
action="NewAccountContactPopup.push((disbursement as AccountDisbursement).Account, Company)"
id="NewAccountContactCompany_SP"
label="DisplayKey.get("SP.TransactionApproval.Web.DisbursementDetailScreen.NewAccountContactCompany")"/>
<MenuItem
action="NewAccountContactPopup.push((disbursement as AccountDisbursement).Account, Company)"
id="NewAccountContactPerson_SP"
label="DisplayKey.get("SP.TransactionApproval.Web.DisbursementDetailScreen.NewAccountContactPerson")"/>
</RangeInput>
below is contactscreen.pcf
<Toolbar>
<ToolbarButton
action="duplicateContactsPopupNavigator.checkForDuplicatesOrUpdate(\ -> CurrentLocation.commit())"
id="UpdateButtonThatForcesCheckForDuplicates"
label="DisplayKey.get("Button.Update")"
visible="duplicateContactsPopupNavigator.ShowCheckForDuplicatesButton"/>
<EditButtons
cancelVisible="true"
pickValue="contact"
updateVisible="not duplicateContactsPopupNavigator.ShowCheckForDuplicatesButton"/>
<ToolbarButton
action="duplicateContactsPopupNavigator.pushFromCurrentLocationToDuplicateContactsPopup()"
id="CheckForDuplicates"
label="DisplayKey.get("Web.Contact.CheckForDuplicates")"
visible="duplicateContactsPopupNavigator.ShowCheckForDuplicatesButton"/>
</Toolbar>
<PanelRef
def="AccountContactCV(contact)"/>
but main popup is expecting returntype as contact but in the above code update button doesn't have any return type
Upvotes: 0
Views: 91
Reputation: 476
What I see is that on the DisbursementDetailDV, the onPick and onChange are doing the same thing. I don't think the onPick is needed. The selected contact is then attached to the disbursement and is accessed that way anywhere else it's needed, so returning the contact isn't necessary.
I don't know if the screens have been changed from the original content, or if they originally worked as written but no longer do. Hopefully this will help you move forward.
Upvotes: 0
Reputation: 612
This appears to be an addition of some SurePath content to the base application. All of the _sp suffixes seem to indicate this. I would download the original SurePath content and compare the current state to that original SurePath code. With the details provided I can't pinpoint the issue you are seeing.
Upvotes: 0