YAFLogo

shahzadgodil
12 years ago
Hi,

We are trying to test this webservice message.

http://yafnet.codeplex.com/SourceControl/changeset/view/b5858975b5dc#yafsrc%2fYetAnotherForum.NET%2fClasses%2fYafWebService.cs 

Our code is

LegacyDb.topic_save(1, "Subject", "", URL, description, message, userid,0, null, "1.1.1.1", DateTime.UtcNow, 1, 30, ref messageId);

This is creating new topic fine in topic table as well as one record in message table. But it is not updating NumPosts field of topic to 1. And because of this, topic is not showing in forum.

If we change NumPosts manually to 1 then it is populating in web.

Please let me know how to fix this?

Shahzad Godil

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
12 years ago

Hi,

We are trying to test this webservice message.

http://yafnet.codeplex.com/SourceControl/changeset/view/b5858975b5dc#yafsrc%2fYetAnotherForum.NET%2fClasses%2fYafWebService.cs 

Our code is

LegacyDb.topic_save(1, "Subject", "", URL, description, message, userid,0, null, "1.1.1.1", DateTime.UtcNow, 1, 30, ref messageId);

This is creating new topic fine in topic table as well as one record in message table. But it is not updating NumPosts field of topic to 1. And because of this, topic is not showing in forum.

If we change NumPosts manually to 1 then it is populating in web.

Please let me know how to fix this?

Shahzad Godil

Originally Posted by: shahzadgodil 

30 looks like the wrong flag which indicates that the message is deleted, you should try 22 instead.

shahzadgodil
12 years ago
It worked like a charm with status code 22

LegacyDb.topic_save(forumID, subject, 1, URL, description, message, userid, 0, null, "1.1.1.1", DateTime.UtcNow, 1, 22, ref messageId);