0 votes

Hello,

We got a strange problem on the crm when editing a cont_comp relation with a custom fields added. When on a contact consult screen tab company if we try to modify relation everything is okay. But for the same contact in edit form screen when we want to modify the company relation an error occur (see screenshot). We try with no custom and we got the same error, so we know that came from database but we don't know where to fixe it.
error editing relation

asked in Partners by (182 points)
edited by
Please include the full url of the edit relation request and the details of the trace
Hi,
here is the full url :
https://crmdpg/11.0/crm/edit?page=edit/Relation&edithandle=8&editform=-1&action=refreshOpener&detail=Comp&detailkey=1554&fromEdit=T

and for the trace:
Call GetField(=F_ROLE, type=MULTIVALUE, json=T, context=ATTR)
Call GetEditHandle()
Call GetLocaleSetting(=ShortDateFormat, moment=T)
Call GetLocaleSetting(=ShortDateFormat, moment=T)
Call GetEdit(field=MEMO)
Call Macro(=RelationMemoField)
Call IfReadOnly(else=
<div class="row">
<div class="small-12 columns text-end">
<button type="button" class="tiny" data-msg="memoTimestamp"><%GetLabel("Time Stamp")%></button>
<button type="button" class="tiny" data-msg="memoFormat"><%GetLabel("Allow Formatting")%></button>
</div>
</div>
)
Call GetEdit(=F_ROLE, data-ajax-url=dialog?_macro=JsonMultiValueList&_macrofile=MacroAjax&edithandle=<%GetEditHandle()%>&field=F_ROLE, data-json={<%GetField("F_ROLE", type="MULTIVALUE", json=T, context=ATTR)%>})
Call GetHeader(=F_ROLE)
Call GetEdit(=D_END, autocomplete=off, data-msg=pickDate;$this;$event, placeholder=<%GetLocaleSetting('ShortDateFormat', moment=T)%>, inputtype=text)
Call GetHeader(=D_END)
Call GetEdit(=D_START, autocomplete=off, data-msg=pickDate;$this;$event, placeholder=<%GetLocaleSetting('ShortDateFormat', moment=T)%>, inputtype=text)
Call GetHeader(=D_START)
Call GetEdit(=MAIN, type=boolean, switch=T, switchclass=switch compact tiny)
Call GetHeader(=MAIN)
Call GetLabel(=Close)
Call GetLabel(=Save)
Call Macro(name=TabContentMemoPlain)
Call OnField(=MEMOFORMATTED, value=1, absent=true, then=TabContentMemoFormatted, else=TabContentMemoPlain)
Call GetFormSections(form=99990202, fielddefs=FormFieldsEdit, noformbounds=T, nosectionbounds=T)
Call Macro(=RelationSectionsForm)
Call OnArgument(argvalue=$more$, value=T, then=<li><a href="#" class="i-cancel" data-msg="close"><%GetLabel('Close')%></a></li>, else=<li><button type="button" class="" title="<%GetLabel('Close')%>" data-msg="close"><i class="i-cancel"></i></button></li>)
Call OnArgument(argvalue=$more$, value=T, then=<li><a href="#" class="i-save" data-msg="save"><%GetLabel('Save')%></a></li>, else=<li><button type="button" class="action" title="<%GetLabel('Save')%>" data-msg="save"><i class="i-save"></i></button></li>)
Call GetCategoryContents(showimages=T, nocontainer=T)
Call Macro(=TabContentMemo)
Call Macro(=TabContentFields)
Call GetCategoryHeaders(standardlabel=Fields, extraattrs= draggable="false")
Call Macro(=TabHeaderMemo)
Call Macro(=TabHeaderFields)
Call GetPopupMenu(id=dd-relation-help, class=has-icons small, count=2, ulargs=data-dropdown-channel="", text1=Link items, image1=i-openwindow, message1=onlineHelp;e110_linkitems, text10=Online Help, image10=i-bookmark, message10=onlineHelp)
Call Macro(name=RelationCmdsTemplate, $_more$=$more$, $icon$=i-cancel, $caption$=Close, $msg$=close)
Call Macro(name=RelationCmdsTemplate, $_more$=$more$, $class$=action, $icon$=i-save, $caption$=Save, $msg$=save)
Call GetLocaleSetting(=ShortTimeFormat, moment=T, context=JS)
Call GetLocaleSetting(=ShortDateFormat, moment=T, context=JS)
Call GetLocaleSetting(=ShortTimeFormat, moment=T, context=JS)
Call GetLocaleSetting(=LongTimeFormat, moment=T, context=JS)
Call GetLocaleSetting(=ShortDateFormat, moment=T, context=JS)
Call GetLocaleSetting(=LongDateFormat, moment=T, context=JS)
Call Macro(=OnlineHelpBaseUrl)
Call GetLanguage(lowercase=T)
Call GetFileBase()
Call Navigate()
Call GetUserKey()
Call Macro(=RelationDetailDefaultTab)
Call IfInserted(then=1, else=0)
Call SetiOption(=UseApplet)
Call OnField(=MEMOFORMATTED, value=1, absent=true, then=true, else=false)
Call Macro(=RelationMemoField)
Call GetArgument(=EditHandle, context=JS)
Call GetUserName(context=JS)
Call GetUserChanged(context=JS)
Call GetBookmark()
Call GetDetail()
Call IfDataUnposted()
Call GetEntityLabel()
Call GetEntity()
Call GetKey()
Call Macro(=MainJsModuleCustom)
Call Macro(=MainJsModule)
Call GetLanguage()
Call LoadScript(=NL_server_deltaplus.js)
Call Macro(=TabContentCategories)
Call OnArgument(argvalue=MEMO, else=<%Macro('TabContentMemo')%>)
Call Macro(=RelationMemoField)
Call OnArgument(argvalue=99990202, else=<%Macro('TabContentFields')%>)
Call Macro(=RelationSectionsForm)
Call Macro(=TabHeaderCategories)
Call OnArgument(argvalue=MEMO, else=<%Macro('TabHeaderMemo')%>)
Call Macro(=RelationMemoField)
Call OnArgument(argvalue=99990202, else=<%Macro('TabHeaderFields')%>)
Call Macro(=RelationSectionsForm)
Call Macro(=CmdOnlineHelpMenu)
Call GetLabel(=Online help)
Call IfReadOnly(else=<%Macro(name=RelationCmdsTemplate, $_more$=$more$, $class$="action", $icon$="i-save", $caption$="Save", $msg$="save")%>
<%Macro(name=RelationCmdsTemplate, $_more$=$more$, $icon$="i-cancel", $caption$="Close", $msg$="close")%>)
Call Macros(=MetaCharset;MetaViewport;MetaDefaultIE;MetaThemeColor)
Call Macros(=JsonRelationModelCommon;JsonConstantsModel;JsonRelationModel;JsonRelationModelCustom)
Call Macro(=JsScriptsRelationTRW)
Call Macro(=RelationScriptsCustom)
Call UseScript(=custom/Custom)
Call UseScript(=Translate)
Call UseScript(=Validate)
Call UseScript(=Edit)
Call UseScript(=Efficy)
Call UseScript(=Base)
Call UseScript(=../lib/js/vendor/require.js, fixedpath=T, data-main=main/relation, data-custom-main=)
Call Macro(=MainJsModuleCustom)
Call Macro(=MainJsModule)
End Inline Function Evaluation
Call UseScript(=custom/js/config/require.config.js)
Start Inline Function Evaluation
Call Evaluate(=<%UseScript('custom/js/config/require.config.js')%>)
Call Macro(=RequireConfigCustom)
Call Evaluate(=)
Call Macro(=RequireConfigDealer)
Call UseScript(=js/config/require.config.js, fixedpath=T, data-custombase=../customs/deltaplusben/, data-dealerbase=../)
Call GetDealerBase()
Call GetCustomBase()
Call GetHiddenArgument(=hidden-panel)
Call GetHiddenArgument(=hidden-detail)
Call Macro(=RelationDetailsContents)
Call Macro(=RelationDetailsHeaders)
Call GetDetailRecordLabel()
Call GetEntityRecordLabel()
Call Macro(=RelationCommandsOnlineHelp)
End Inline Function Evaluation
Call OnArgument(=fromEdit, then=CmdSaveCancelClose, else=CmdSaveClose)
Start Inline Function Evaluation
Call Macros(namesmacro=RelationCmdsMain, $macro$=RelationCmdsTemplate)
Call UseEditForm(id=edit-form)
Call UseScript(=../lib/js/vendor/modernizr.js, fixedline=T, fixedpath=T)
Call UseStyleSheet(page=efficy)
Call OnLanguage(ar=efficy-rtl, else=efficy)
Call Macro(=MetaHead)
Call GetEntityLabel()
Call GetDetailLabel()
Call GetLabel(=Edit Relation)
Call Macros(=RelationScripts;RelationModel;RelationCustomScripts)
Call Macro(=RelationFormClose)
Call Macros(=RelationCommands;RelationEntityName;RelationDetails)
Call Macros(=RelationFormOpen;RelationDropdownHost)
Call Macros(=RelationHeader;RelationHeaderCustom)
Call Macro(=PageTitle)
Call OnLanguage(ar=rtl, else=ltr)
Call GetLanguage(lowercase=T)
Call Macros(=RelationQueries)
Call Macro(=Doctype)
Call LoadMacros(=MacroLibrary;MacroRelation;MacroEditS)
Call SetBookmark()
Start Function Evaluation
End Initialisation
Connect to Application Server
Verify Arguments
Initialise Request Handling /edit
It's directly related to the MULTIVALUE datatype, this somehow makes the <%GetEdit()%> not working. I tried quicly finding a solution, but I can't.

Anyone else from R&D?
Hi,

Do you have any response from R&D about this problem ?

1 Answer

0 votes

This requires correction in the efficy web server code. The <%GetField()%> doesn't use the correct dataset in case of editing a relation within the edit context of a main entity.

We've registered this issue as CFT-2018-89986, correction will be published soon in Efficy 11.1.

answered by (836 points)
Welcome to Efficy Overflow, where you can ask questions and receive answers from other members of the community.
1,167 questions
1,425 answers
1,717 comments
325 users