• nikoo.malek1.3927635000918623E12
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
I try to join 2 tables in SOQL that I am using in C#. not sure how get the value from second table that is contact table.
This is my query:

SOQL = "select Name,FirstName,LastName,BillingCity,Id, (Select ID, LastName,Title from Contacts) from Account";
        


            queryResult = SfdcBinding.query(SOQL);
         

            if (queryResult.size > 0)
            {

                for (int i = 0; i < queryResult.size; i++)
                {

                    Account acc = (Account)queryResult.records[i];
                    string name = acc.Name;
                    string FirstName = acc.FirstName;
                    string LastName = acc.LastName;
                    string city = acc.BillingCity;
                    string Id = acc.Id;
                 
                                  
                }

how access to ID, LastName,Title from contact table in code?
I am using sales force API with C#. in the query that I am writing I am not sure how pass parameter to the select query. My query works when it looks like this:
            SOQL = "select AuthorId,Name, Description,Type from Document where AuthorId='005G0000003s4a8IAA'";     

But I am not sure how to replace the value in AuthorId that is '005G0000003s4a8IAA' to variable that I am passing to this method like: id?
I wonder instead of using select statement like this to work with sales force Api:
SOQL = "select AuthorId,Name, Description,Type from Document";

Is there any way that  can use store procedure?
I try to join 2 tables in SOQL that I am using in C#. not sure how get the value from second table that is contact table.
This is my query:

SOQL = "select Name,FirstName,LastName,BillingCity,Id, (Select ID, LastName,Title from Contacts) from Account";
        


            queryResult = SfdcBinding.query(SOQL);
         

            if (queryResult.size > 0)
            {

                for (int i = 0; i < queryResult.size; i++)
                {

                    Account acc = (Account)queryResult.records[i];
                    string name = acc.Name;
                    string FirstName = acc.FirstName;
                    string LastName = acc.LastName;
                    string city = acc.BillingCity;
                    string Id = acc.Id;
                 
                                  
                }

how access to ID, LastName,Title from contact table in code?
I wonder instead of using select statement like this to work with sales force Api:
SOQL = "select AuthorId,Name, Description,Type from Document";

Is there any way that  can use store procedure?