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
MykMyk 

Retrieving Lookup Relationship ID.

I am trying to figure out how to retrieve the ID of a Custom object I have connected to Contacts by lookup relationship.

 

To be specific:

Custom Object name is "Employer Group".

The Contact object has a lookup rel. to Employer Group object.

So a Contact is related to One Employer Group only.

Employer Group can have many contacts associated to it.

 

When I use "Select * from Contact" for example,

how can I figure out what Employer Group is a Contact related to?

 

I listed all the fields that the Contact SObject3 contains and could not find one referring to Employer Group.

But when I list the fields for Contact, there is the Emoployer Group field. In Office edition in Word, Listed are the Employer Group and the Employer Group :ID fields.

 

 

Thanks.

 

Myk.

 

 
Ron HessRon Hess
This field is only visible using the 7.0 API, as it is a new feature and we avoid putting new features into older API endpoint.

to see it, modify your code to open the 7.0 API endpoint rather than the 6.0, which is the default for the office / outlook toolkit.

NOTE: the 6.0 API is what the current version of the office / outlook toolkit was tested with, please report any issues you see when using the 7.0 API and the VB toolkit.
foghornfoghorn
There is one show stopper with query more in 7.0 for older Office Toolkits. Best way to get the fix right now is to install the latest salesforce Offline edtion.
MykMyk

Thank you both for your fast response.

One question only:

Since as you mentioned, API V6.0 is the only one tested with VB and Office, do you mean that I may try with the API V7.0 that is offered under Java?

Thanks again.

Myk

 

foghornfoghorn
Oh yes, the java and .net clients are fully tested.
MykMyk

But the .NET one is API 6.0 (at least where I was looking at under Projects & Toolkits).

The only ones that are API 7.0 are for Java.

Can I install the one for Java and use is in .NET (And try it in VB)?

Or can you direct me to a location where I can get the Ver 7.0 for .NET.

Thanks.

 

SuperfellSuperfell
Just download the current WSDL from the app and use it from .NET, the quickstart is just sample code, there's nothing in there you actually need to do new development work.
MykMyk
Would you have any idea on how could I import the WSDL.XML (the API 7.0) document into the Visual Basic 6.0 or Microsoft Office 2000?
 
Thanks.
 
SuperfellSuperfell
for .NET (its either Add Web Service in Visual Studio, or run wsdl.exe for the command line tools), but that doesn't help you for VB6 or O2K, so I'm little confused as to what you are looking for, as you said .NET, but now are asking about VB6.
MykMyk

If you take a look at the message #4 in this thread I actually am trying this in Office 2000.

The only reason I mentioned .NET is because an associate of yours mentioned that 7.0 is only tested on .NET and recommended me to try it in VB6 (Office 2000). I could not find any other version of Toolkit than the one for Java, so I asked where is the .NET toolkit so i can try it in VB6.

The initial question was: If I have a custom object "Employer Group" and many Contacts related to one Employer Group using Lookup Relationship. In a code, If I run a query "Select * From Contact" how can I determine what Employer Group is this contact related to. There is no Employer Group Name, or ID field in the result query, although in the office edition then I pull down all the fields for the contact, the Employer Group Name and Employer Group: ID are listed. In the VB code however the fields are not there.

I guess there must be some table that contains all the lookup connections, but I do not know how to get to it and reference Contact to Employer Group within VB6 code.

I need to Move some data from Contact object to the Employer Group object but for all of the Contacts currently in the system.

I do not know what Employer Group the Contact is related to.

Also there ase some Contacts that do not even have Employer Group assoicated with them. I would need to create Employer Groups for those contacts and then programaticaly associate those contact with Employer Group. But if i can not even get to the Employer Group ID field n Contacts, how can i do that?

I was hoping to do all this from within a VB6 (Access 2000 code).

I was told that API 7 can display Lookup Relationship IDs, but now, I do not know how to implement API 7.0 into Office 2000 or VB6.

Regards,

 

 

MykMyk

If you take a look at the message #4 in this thread I actually am trying this in Office 2000.

The only reason I mentioned .NET is because an associate of yours mentioned that 7.0 is only tested on .NET and recommended me to try it in VB6 (Office 2000). I could not find any other version of Toolkit than the one for Java, so I asked where is the .NET toolkit so i can try it in VB6.

The initial question was: If I have a custom object "Employer Group" and many Contacts related to one Employer Group using Lookup Relationship. In a code, If I run a query "Select * From Contact" how can I determine what Employer Group is this contact related to. There is no Employer Group Name, or ID field in the result query, although in the office edition then I pull down all the fields for the contact, the Employer Group Name and Employer Group: ID are listed. In the VB code however the fields are not there.

I guess there must be some table that contains all the lookup connections, but I do not know how to get to it and reference Contact to Employer Group within VB6 code.

I need to Move some data from Contact object to the Employer Group object but for all of the Contacts currently in the system.

I do not know what Employer Group the Contact is related to.

Also there ase some Contacts that do not even have Employer Group assoicated with them. I would need to create Employer Groups for those contacts and then programaticaly associate those contact with Employer Group. But if i can not even get to the Employer Group ID field n Contacts, how can i do that?

I was hoping to do all this from within a VB6 (Access 2000 code).

I was told that API 7 can display Lookup Relationship IDs, but now, I do not know how to implement API 7.0 into Office 2000 or VB6.

Regards,

 

MykMyk
I figured out how to retrieve the ID.
I created a formula field that contains the value from the ID field.
 
Storing information in the ID field is impossible without the API 7.
 
Myk.
 
 
Kevin KellyKevin Kelly
Myk

I am interested in learning exactly how you accomplished this.  I have a similar problem.  I am integrating an Access App written with VBA with SFDC.  I created a lookup field in the accounts table that points to a contact and another lookup field that points to a custom object named fund.

Now I want to load a bunch of data from Access into SFDC and I can't find the field into which I should write the ContactID for the contact field and the Fund ID for the Fund lookup field.

I am using the Office Toolkit to communicate via the Office API.

Thanks

Kevin
MykMyk

Kevin,

here is how I did it, but is does not work in any scenario you may want to use it.

One that it works in, is the following: You have an Obj1, which is your "parent object", and let's say an Account, which is your child object.

What I needed was to determine what Obj1 is an Account assigned to. I would then create a custom formula field in Accounts which contained only the following value: {!Obj1__c}.  This way I was able to for any given Account, figure out what Obj1 is it assigned to. Or for example to select all the Accounts with particular Obj1 assigned etc.

By the way, for the above case, make sure you check for the identical letter case for the ID once it is delivered by the “.Query” method because the QueryResultSet3 is not case sensitive so IDs A0000058963AacB and A0000058963Aacb will both be pulled. And also, for some reason (it must be by design) the formula pulls only 15 character IDs. I never found it to be a problem but just to make you aware.

However, there is one limitation (at least :-) to this so called semi solution. The Account must be manually assigned to a particular Obj1. Since you can only view the formula field, you cannot control it's value, and you cannot even see the source field Obj1__c. That creates a problem when you need to create an Account and assign it to a certain Obj1. I could not resolve that issue programmatically.

This solution worked for me because I was only trying to match Accounts already created and assigned to Obj1.

Hope it helps you too.

Myk.

 

Kevin KellyKevin Kelly
HI Myk,

Thanks for taking the time to respond.  Your explanation should be helpful for another project that I am working on...unfortunately, I was hoping to populate an account id field while importing some data.  Doesnt look like its easily accomplished...bummer.

Thanks again!

Kevin