The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
DoCompleteStep
Posted: 23 Jul 09 3:18 AM
|
Hi Guys,
Could someone give me a quick explanation of how to use DoCompleteStep to get the auditid of the current salesprocess step.
Thanks all. |
|
|
|
Re: DoCompleteStep
Posted: 24 Jul 09 10:12 AM
|
DoCompleteStep is a function contained in the VBScript "SP_SalesProcessFunctions"
The function takes one parameter as an input which is the SalesProcessAuditID of the step you are to complete. The function returns True (not sure why this is but that is what the standard script does, at least in SLX v7.5.1)
var = DoCompleteStep("ABC123456789") 'var will always = true |
|
|
|
Re: DoCompleteStep
Posted: 24 Jul 09 10:17 AM
|
If you want to get the current step, I dont think this is the right function to use. Instead you can query the database to get the record from the salesprocessaudit table where iscurrent=T
select * from salesprocessaudit where entityid='{OPPORTUNITYID}' and iscurrent='T' |
|
|
|
Re: DoCompleteStep
Posted: 24 Jul 09 10:21 AM
|
Thanks for your help. As im new to SLX im just relieved to have found this but have no idea why it works the way it does but in the SalesProcess Plugin script there is a PrimaryKeyValue declared in the line:
Sub grdSalesProcessHyperlinkStart(Sender, PrimaryKeyValue, FieldName, Value, ByRef LaunchBrowser)
this PrimaryKeyValue seems to provide the SALESPROCESSAUDITID of the current step being clicked so finally i have everything i need now to finish off my customisation. |
|
|
|
Re: DoCompleteStep
Posted: 24 Jul 09 10:29 AM
|
grdSalesProcessHyperlinkStart is an event which runs on the clicking of a hyperlink in a datagrid row. This event has hardcoded to accept these parameters. The PrimaryKeyValue is the primarykeyvalue of the row being clicked. You can see what field is identified as the primarykeyvalue by looking at the datagrids properties. In this case the key is the SALESPROCESSAUDITID. |
|
|
|
Re: DoCompleteStep
Posted: 24 Jul 09 11:15 AM
|
The reason why I had suggested before to use this function was because he wanted to know if the current Step being Completed was the last step of the Process.
So, with that in mind, knowing where that the code will eventually flow through the DoCompleteStep, my idea was that you would want to "hook" into this function (In other words, add your code into this function).
Since this function is provided with the AuditID, by hooking into this function you will be putting your code in the right place, plus having access to the AuditID. This is not a function that you would call to retreive the current step's ID. It is just the best place (in my opinion, and based on my experience customizing Sales Processes in the past) to add the custom code. |
|
|
|