function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KoenVMKoenVM 

Problem "Find" with Officetoolkit

Hi,

 

I found a problem today when you want to do a find from the officetoolkit.

If one of the fields from the "returning" part is a reference field, you will get an error saying invalid field.

If you run the same query from the apex explorer for example, the query works. (same query, same environment)

I now had to create some formula fields to return these fields from the references but that can't be the way it should be done.

 

Anyone know what might be causing this and how I can fix this?

 

Thanks in advance. 

 

 

KoenVMKoenVM

Small update on this...

We managed to fix this partially but we are still stuck.

We saw that the problem was caused because the office toolkit is still using version 6 by default.

By changing the serverurl to version 13, the query works.

 

Now, we still have a problem to get all the data out of the records.

 

Consider the following dummycode:

 

SObject3 so = theCurrentItemFromTheQueryresult;

 

if we then do something like:

 

so.Item("Account.Name").Value

we get an error from salesforce something like "INVALID_FIELD_INSERT_UPDATE"...

 

How to correctly retrieve these fields? (I do specificly tell the find query to return Account.Name from for example the Case object)

 

Anyone have a clue? Thanks.