Cannot update lookup field for Custom entity

Oct 29, 2009 at 11:43 AM

Hi

I have a custom entity called projects on my CRM that I am trying to do a bulk edit from the Sales Order entity. I downloaded the tool and selected the view from CRM to update. I then updated the values for this lookup field by exporting it to excel and then trying to export the excel file back into CRM but this returns errors for the lookup field im trying to update. Are there any rules for doing this that i am missing or do i need to do this from the server instead of from a desktop? I copied the dll files in the assembly folder into the Win32 folder. Please help.

Thanks.

Coordinator
Oct 29, 2009 at 4:17 PM

Hi Aobubo,

If you can connect to the crm and get data from the selected view the upload should also work. (unless you have credential issues)

When you retrieve the view in the crm updater tool you'll notice that the lookup field needs to have the following format without quotes: "entityname","guid of the entity"

(so seperated with a comma)

When you try to export the excel file back to crm you'll notice the lines that have errors become red (or the fields) when you hover over the field with your mouse the error should become visible. What does that state ?

 

let me know if this helped.

Wim

 

 

Oct 29, 2009 at 5:00 PM

Many thanks for your response,

The error message says "Length cannot be less than zero. Parameter name: length". Unfortunately, I dont know how to resolve this as the field in the lookup custom entity is of max length 100. Your help is much appreciated.

Coordinator
Oct 29, 2009 at 6:21 PM
Hi.

Would it be possible for you to copy/paste one row (with headers)of the csv you're trying to upload?

Kr,
Wim


On 29 Oct 2009, at 17:00, aobubo <notifications@codeplex.com> wrote:

From: aobubo

Many thanks for your response,

The error message says "Length cannot be less than zero. Parameter name: length". Unfortunately, I dont know how to resolve this as the field in the lookup custom entity is of max length 100. Your help is much appreciated.

Oct 30, 2009 at 10:13 AM

Hi,

This is the field displaying the errors below. Thanks.

new_siteidurnid
MH.GR.DY9
AC.RA.SR6
GWH.WR.ME13
P.SL.SR3
TL.P.PE28
YC.TCR.CB2
FH.LD.BN27
LLS.SHR.SW16
NRA.ER.RG6
KW.BR.BA14
GC.DR.
WH.RL.RG30
DSP.SR.SP7
HC.WH
CSDP.E.CT20
BSDP.WL.RH5
HC.BG.SN12
SCS.MA.SN3
GC.SC
HA.GL.HP3
HC.TD.BA14
GHE.NG.NW3
HC.OS.BS21
HC.BC.BS10
JOA.WSC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MC.ME15
JBL.RR.PO19
W.FS.M6
BWH.CCR.KT4
W.FS.M6
JBL.SMR.TW15
BMC.WKR.RG6
HC.BG.SN12
GT.GS.BB3
GT.CS.
NC.MR.DA8
EC.OS.W1D
JBL.W.KT15
JBL.W.
WU.PO.GL7
QDA.ER.BS5
L.CG.
L.TR.BN17
MS.JF
MS.JF
MS.JF
MS.JF
MS.JF
TW.QW
TW.H.BN27
PSH.EM.SN12
PSH.QW.SN10
JLP.RF.SE7
TW.S.CSH
WC.F.
WH.SD.TF1
PSH.MC
LL.HS.
TW.S
OA.CL.CR5
O2A.CL.LR5
QDA.ER.BS5
PWP.GGS.BS1
WH.BR.BH23
TW.CA.CF23
BH.CS
TW.S.ECO
CC.K.ST5
PP.SM.SW19
MS.TR.RG40
MMR.CS.NN16
MCD.CL.B71
BASF House
NAE.PA...
JAGS.EDG.SE22
BH.MR
BH.MR
HC.OP.
TW.YMC.ME15
TW.YMC.ME15
WTH.ER.TQ7
HC.BC.BS10
TW.YMC.ME15
PSH.RPA.TN23
TW.YMC.ME15
PSH.RPA.TN23
MC.VP.B78
DS.HS.GL20
TW.SH
MB.RR.W6
TR.WP.SY13
LP.BL.PE21
MH.TR.BD13
PSH.QW.SN10
PSH.QW.SN10
PSH.CH.GL4
LP.BL.PE21
BC.
VP.TM.LU3
CDMP.BB
CDMP.B
PC.B.ST8
L.VR.GU14
L.VR.GU14
WHS.BS
HC.SC.BA2
WH.LL.PR25
TW.S.RF
JSS.HR.CW12
TT-TC-TTB
TT-PR-001
TT.PP.AO1
WH.LL.PR25
HC.WR.BA4
BH.CS.
TW.YMC.ME15
Coordinator
Oct 30, 2009 at 11:09 AM
Hi Aobubu,


The name of the field says it all : new_siteidurn ID.

so instead of

new_siteidurnid
MH.GR.DY9

it should look like

new_siteidurnid
entityname,1C15C782-5D29-4C4A-89BF-49E2396CCE96


Which means that MH.GR.DY9 is of type entityname and has id 1C15C782-5D29-4C4A-89BF-49E2396CCE96


hope this helped.

Wim
Nov 9, 2009 at 9:28 AM

Hi Wim,

Thank you very much for the detailed explanation. It worked!

Alex

Nov 12, 2009 at 3:08 PM

Hi Wim,

Sorry to trouble you again. I spoke too soon when I said it worked. Whilst using the tool after getting the data in the format - entityname,1C15C782-5D29-4C4A-89BF-49E2396CCE96 and Exporting the csv file to CRM it appears to upload ok as the colour of the records change but this is not actually replicated in CRM. Can you help please? Thanks.

alex

Oct 5, 2010 at 4:45 PM

Sorry for reviving an old post, but I struggled with the exact same issue recently and found a solution...

I eventually realized that it is important that the first line of the csv file which labels the columns of the csv file uses the actual CRM attribute names of the data fields i'm trying to import into the grid. (and case sensitive at that). If it does not, the data still gets imported into the grid, and the upload to crm shows it to be successful, but unless the corresponding csv column was named exactly as the entity's attribute, it will skip over that data element when building the record in CRM.