Skip to main content

I implemented application rating screen using "Login flows" option. Now I have a requirement, based on the application name, need to display the rating question in the rating screen.

 

Once click the login button after enter use name and password, need to know application name based on the "Application Id" which is available in the url. 

 

Note: I am able to know last login application name using below code

 

public static String getAppName() 

   UserAppInfo userAppInfo = [SELECT Id, AppDefinitionId FROM UserAppInfo WHERE UserId = :UserInfo.getUserId() LIMIT 1]; 

AppDefinition appDefinition = [SELECT DurableId, Label FROM AppDefinition Where DurableId = :userAppInfo.AppDefinitionId LIMIT 1]; 

return appDefinition.Label; 

}

 

Here i donot want to know last login application name. Need to know application name based on the "Application Id" which is available in the url.

 

Can anyone help or any suggestions to fulfill the requirement, if possible please provide sample code.

 

Thanks in advance

0/9000