The CreatorCon Call for Content is officially open! Get started here.

Need to Autopopulate assignment group in Transfer order line tasks

Arun Priya
Tera Contributor

Hi,,
I have a requirement in Transfer order, in which I need to autopopulate assignment group from table "alm_transfer_order" variable "From Stockroom" assignment group should be copied to "alm_transfer_order_line" assignment group.

Do anyone have idea on this implementation, if then please share the details here.

ArunPriya_0-1753437988101.png

 

 

13 REPLIES 13

Rafael Batistot
Kilo Patron

Hi @Arun Priya 

 

 

Create a Business Rule

  • Table: alm_transfer_order_line
  • When: before insert
  • Condition: current.assignment_group.nil() (to only set if not already defined)
  • Advanced: check “Advanced”

 

(function executeRule(current, gForm, gUser, gSNC) {
// Load the parent transfer order
var transferOrder = current.transfer_order.getRefRecord();
if (!transferOrder.isValidRecord()) return;

// Get the stockroom from the transfer order
var stockroom = transferOrder.from_stockroom.getRefRecord();
if (!stockroom.isValidRecord()) return;

// Get the assignment group from the stockroom
if (!stockroom.assignment_group.nil()) {
current.assignment_group = stockroom.assignment_group;
}
})();

 

If you found this response helpful, please mark it as Helpful. If it fully answered your question, consider marking it as Correct. Doing so helps other users find accurate and useful information more easily.

Hi @Rafael Batistot  ,

It didn't work for me. Can you check what is the error.

ArunPriya_0-1753455074067.pngArunPriya_1-1753455109750.png

 

I can't see the image

RafaelBatistot_0-1753459985502.png

 

If you found this response helpful, please mark it as Helpful. If it fully answered your question, consider marking it as Correct. Doing so helps other users find accurate and useful information more easily.

Hi @Rafael Batistot 
Sorry for the delay I have executed but it is only updating after the description is updated.populate.png