You need to sign in to do that
Don't have an account?
gsickal
Code:
Bug in processSubmitRequest?
Is there a bug in processSubmitRequest? I have a process that requires the approver to be manually chosen but when I run the processSubmitRequest on this I get an error saying a required field is missing. If I try to set the nextOwnerId it doesn't work either. Is this a bug or if manual requests are not supported is there a graceful way to determine this and report it back to users instead of displaying a message implying a field is missing? Here is the syntax:
var request = new sforce.ProcessSubmitRequest(); request.objectId = id; //request.nextOwnerId = approverIds; //request.comment = "Test Process Submit Request"; var requests = new Array(1); requests[0] = request; var results = sforce.connection.process(requests);
//request.nextOwnerId = approverIds;
//request.comment = "Test Process Submit Request";
There is nothing called nextOwnerId in processSubmitRequest. You should use .nextApproverIds, it should work. Here is the piece from the WSDL
<complexType name="ProcessRequest">
<sequence>
<element name="comments" type="xsd:string" nillable="true"/>
<element name="nextApproverIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</sequence>
</complexType>
Hope this helps!
All Answers
Thanks, I saw that example for Java. My example though is for an Ajax Scontrol and comes straight from the Ajax api docs. My question still remains, how do you set the approver id for a manual process? it didn't work for me.
//request.nextOwnerId = approverIds;
//request.comment = "Test Process Submit Request";
There is nothing called nextOwnerId in processSubmitRequest. You should use .nextApproverIds, it should work. Here is the piece from the WSDL
<complexType name="ProcessRequest">
<sequence>
<element name="comments" type="xsd:string" nillable="true"/>
<element name="nextApproverIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</sequence>
</complexType>
Hope this helps!
is 'processSubmitRequest' not only for Initially Approval Request?
and processWorkItemRequest only has for 'approve' 'reject' and 'remove'. There's nothing for 'Reassign'
The below code doesn't quite work...
Code:
To have this 'Reassignment' the next approver must be set to 'Let approver manually select who the next approver is'
Code: