Intuit Financial Community: Creating S60 forms using SDK - Intuit Financial Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Creating S60 forms using SDK

#1 User is offline   MEUK Corporation Icon

  • New Member
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 17-December 09

Posted 22 December 2009 - 05:01 PM

I have encountered another problem while using the SDK - if this isn't the right place for these queries, someone let me know.

I have programmatically created a T2 file with a T661 form. Now I need to add a S60 form for each of the R&D projects (so one or more S60 forms). However, I seem to be unable to add them to the same T2 file (or to their own T2 file, for that matter). Here is the code (in C#):

T2008T2File T2FileObj = new T2008T2File();
T2008T2Client T2Client = (T2008T2Client)T2FileObj.Client;

T2Client.set_Field("T661.B[4]", 1); // line 160
T2Client.set_Field("T661[5]", 0); // 300
T2Client.set_Field("T661[6]", 22750); // 305

T2Client.set_Field("T2S60.S[0,0]", "My RD project"); // 200
T2Client.set_Field("T2S60[0,0]", new DateTime(2007,11,01)); // 202

string filename = @"C:\Temp\" + T2FileObj.SuggestFileName();
if (File.Exists(filename)) File.Delete(filename);
T2FileObj.SaveFile(filename);


Thank you for your assistance with this issue.
0

#2 User is offline   Dave@Intuit Icon

  • Senior Member
  • PipPipPip
  • Group: Intuit Staff
  • Posts: 107
  • Joined: 06-February 07
  • Gender:Male
  • Location:Mississauga

Posted 23 December 2009 - 01:21 PM

View PostMEUK Corporation, on Dec 22 2009, 11:01 AM, said:

I have encountered another problem while using the SDK - if this isn't the right place for these queries, someone let me know.

I have programmatically created a T2 file with a T661 form. Now I need to add a S60 form for each of the R&D projects (so one or more S60 forms). However, I seem to be unable to add them to the same T2 file (or to their own T2 file, for that matter). Here is the code (in C#):

T2008T2File T2FileObj = new T2008T2File();
T2008T2Client T2Client = (T2008T2Client)T2FileObj.Client;

T2Client.set_Field("T661.B[4]", 1); // line 160
T2Client.set_Field("T661[5]", 0); // 300
T2Client.set_Field("T661[6]", 22750); // 305

T2Client.set_Field("T2S60.S[0,0]", "My RD project"); // 200
T2Client.set_Field("T2S60[0,0]", new DateTime(2007,11,01)); // 202

string filename = @"C:\Temp\" + T2FileObj.SuggestFileName();
if (File.Exists(filename)) File.Delete(filename);
T2FileObj.SaveFile(filename);


Thank you for your assistance with this issue.


When a field code is represented as [0,0] it means it's a part of a group, in this case it's a group forms (there can be multiple S60s in a T2 file.

Try using:
T2Client.set_FormCount("S60", 1);
to augment the form count and create an S60 before trying to write to it.

Hope that helps!
0

#3 User is offline   MEUK Corporation Icon

  • New Member
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 17-December 09

Posted 23 December 2009 - 01:38 PM

Thanks again, Dave! That was the solution.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users