Skip to main content
Nintex Community Menu Bar

Salesforce LWC + Loop.loopMessage not working on Apex

  • August 20, 2021
  • 2 replies
  • 189 views
  • Translate

Hi,

I am trying to call 

Loop.loopMessage  request from LWC  Apex controller.  There are no error or exception .. but document is not generating.  
The same method when I will call from VFpage+Apex Controller is working fine.  Is it a Known issue .. any workaround please ?
Please help .. I appreciates.  
 
Below is My Code which is not working on LWC apex Controller class .
@AuraEnabled
    public static void attachCaseSheetWithContact(String intakeSelectedId) {
       system.debug('::intakeSelectedId::'+intakeSelectedId);
       Loop.loopMessage lm = new Loop.loopMessage();
       lm.requests.add(new Loop.loopMessage.loopMessageRequest(
                                   intakeSelectedId,
                                   'a0U1N000007DGdq',
                                   new Map<string, string>{ 'deploy' => 'a0T1N000005S2Ty'}
       ));
  
       system.debug('::lm::::'+lm);
  
       if(lm != null && lm.requests != null && !lm.requests.isEmpty()){
           try{
             system.debug('::Request Sent :::'+lm);
             if(!test.isRunningTest()){
                lm.sendAllRequests();
             }
           }catch(Exception ex){
               system.debug('::Exception Found showCaseSheetPreview::: ');
               system.debug(ex);
              // ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error, ex.getMessage()));
           }
        }
       
    }
 
Did this topic help you find an answer to your question?

2 replies

  • Author
  • 1 reply
  • August 27, 2021

Hi Community members.. Everything is working fine for you using   LWC ..?  

 

I am getting response as below ..

<?xml version='1.0' encoding='utf-8'?> <soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>

<soap:Body>

 <notificationsResponse xmlns='http://soap.sforce.com/2005/09/outbound'>

  <Ack>false</Ack>

</notificationsResponse>

</soap:Body> </soap:Envelope>

Translate

Forum|alt.badge.img+1

Hi @Virendra - Did you happen to get a response for this issue ?  I’m working on a similar solution where LWC is invoking the loopMessage from Partner Community and seems like everything works fine but there is no file generated or attached. 

Do respond if you get this.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings