Add CommentLine to a PO

Discussions relating to breakout scripting, .NET and COM programming with Jiwa objects.

Add CommentLine to a PO

Postby OliverYan » Mon Feb 26, 2018 3:01 pm

Hi,

I have created a plugs to insert a commentline to PO, the key parameter NewKey is now a Object, not a string value. how/what value can I assign value to this object?

Here is my code,

Dim oNewKey=New Object()

If CommentLineText<>"" Then
purchaseorder.Lines.AddCommentLine(CommentLineText,oNewkey,0)
End If

no error raised when I compile this code. but when I run it in PO creation, it crash Jiwa.
Would you please help?

Thanks,
Oliver
OliverYan
Occasional Contributor
Occasional Contributor
 
Posts: 13
Joined: Tue Nov 11, 2014 11:26 pm
Topics Solved: 1

Re: Add CommentLine to a PO

Postby Scott.Pearce » Mon Feb 26, 2018 3:05 pm

Declare newKey as a string. i.e.

Code: Select all
Dim newKey As String = ""

If CommentLineText<>"" Then
    Lines.AddCommentLine(CommentLineText, newKey, 0)
End If


newKey is a return parameter, after the call it will contain the key to the new line in the lines collection.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

Re: Add CommentLine to a PO

Postby OliverYan » Mon Feb 26, 2018 3:12 pm

Hi Scott,
Thanks for your really quick reply.

I just changed as your sample. but get same result as before.
my Jiwa version is 7.00.175.

any suggestion?

Thank you very much.
Oliver
OliverYan
Occasional Contributor
Occasional Contributor
 
Posts: 13
Joined: Tue Nov 11, 2014 11:26 pm
Topics Solved: 1

Re: Add CommentLine to a PO

Postby Mike.Sheen » Mon Feb 26, 2018 3:14 pm

OliverYan wrote:my Jiwa version is 7.00.175.

any suggestion?


Hi Oliver, You need to ask this question in the Version 7 forum. This is the version 6 forum.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Add CommentLine to a PO

Postby OliverYan » Mon Feb 26, 2018 3:18 pm

Hi Scott,
sorry for that. :)
I just repost on Jiwa 7 forum.

Thanks,
Oliver
OliverYan
Occasional Contributor
Occasional Contributor
 
Posts: 13
Joined: Tue Nov 11, 2014 11:26 pm
Topics Solved: 1


Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron