BrianFord
asked on
InsertingGoldMine Notes using SQL Stored Procedure
I'm running GoldMine 6.7 using SQL Server as the back-end
I need to add Notes to a contact record from with a Stored Procedure.
I have the GoldMine API's and there is a module called GMW_WriteContactNotes which is supposed to do this but I can't figure out how to use it.
According to the documentation the syntax is: EXEC GMW_WriteContactNotes @gmnv
I need to pass the acctno and the notes into this, does anyone have any examples??
I need to add Notes to a contact record from with a Stored Procedure.
I have the GoldMine API's and there is a module called GMW_WriteContactNotes which is supposed to do this but I can't figure out how to use it.
According to the documentation the syntax is: EXEC GMW_WriteContactNotes @gmnv
I need to pass the acctno and the notes into this, does anyone have any examples??
ASKER
thanks, I have that but I'not sure how to setup the NV pairs, do you have any example T-SQL code?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, this works great, the note gets entered but I do get the following message returned
The 'GMW_NV_SetValue' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.
Have you seen this before?
The 'GMW_NV_SetValue' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.
Have you seen this before?
Which line does it show that error?
I have not used the Stored Proceedures myself as I tend to create applications in VB for them
I have not used the Stored Proceedures myself as I tend to create applications in VB for them
ASKER
It's one of the SetValues but I'm not sure which. Buit I will continue to troubleshoot.
The good news is that everythng seems to get entered just fine and the SP does not throw an error, so for now I'm happy to work with it.
Thank you again for your help, very much appreciated :)
The good news is that everythng seems to get entered just fine and the SP does not throw an error, so for now I'm happy to work with it.
Thank you again for your help, very much appreciated :)
Do you have a MASTER user , possibly this is the issue, also make sure the speach marks are real speach marks ' i noticed after my posting they show ` not '
ASKER
thanks, I did correct the the speech marks :)
I'll double check the user
I'll double check the user
Here is the documentation snippet you need
GMW_WriteContactNotes
Write notes, including the required notes header, to a contact record. Recid or Accountno can be passed to identify the record, although, RecID is the preferred method of identifying the record.
Syntax: EXEC GMW_WriteContactNotes @gmnv
Parameters:
@gmnv: GMNV containing required and optional name/value pairs
Required NV’s:
User
The user scheduling or making the change to the activity. If the USERID NV is not passed (the user the activity is to be scheduled for) then the activity will be scheduled for the USER NV.
Notes
The notes to be added. Cannot exceed 255 characters.
Optional NV’s:
RecID
The RecID of the record to be modified.
Accountno
Accountno of Contact1 record
UserID
Username to be placed in Notes header if different than User
Return Status:
-120
An invalid @gmnv parameter has been passed. Be sure to use sp_CreateGMNV and sp_GMNVSetValue before calling sp_WriteSchedule
-130
The required NV User was not passed.
-170
Both Accountno and RecID were not passed. At least one of these must be included in the gmnv.
-180
The RecID or accountno passed does not exist in contact1